I think I understand the basics of create winforms user control. I can do Add New and select user control and that will give me a design surface and designer file and code-behind file etc. And then I could change it to inherit from something other than UserControl (like listbox or text box).
The thing that is different for me this time is the user control needs to be a list control (like a list box) that can be data-bound and with two data-bindable controls in it (two combo boxes).
I am not sure where to start? Can anybody reference a document or some obvious bit in the tooling that I am missing that will make it quick and easy? Any approaches I can take like extending an existing control. Any gotchas I need to be aware of?
Thanks.
Seth
EDIT
I have decided to take a different approach. I am leaving the question up, though. This is clearly difficulty than I had guessed. WPF is not an option for me unfortunately. Just gonna use a data grid.
This is where you make a mistake…when you derive from UserControl you shouldn’t change the inheritance. Inheriting from UserControl gives you exactly the possibility to place multiple different controls on your design surface (like a listbox and two comboboxes). These combined controls make your unique (user)control which you should give a self-explanatory name. understand it? It’s really simple, very powerfull, very reusable, fun and we use it a lot.
A good reference may be this: Microsoft walkthrough, MonthPicker (simple)