If you have two properties (i.e. Display member and value member) which the user can set in the designer (or in the code), you should be able to call your base class ( UIComboBox ) and set those value to their equivalent in the base class.stackoverflow.com»
If you have two properties (i.e. Display member and value member) which the user can set in the designer (or in the code), you should be able to call your base class (UIComboBox) and set those value to their equivalent in the base class. EDIT (after comment): This link provides you 2 ways of getting the entity fields of a given entity (one dealing with Entity Data Model, the second with Reflection).
It solves half of your problem. But I don't know a way to bind this list of fields to the designer...stackoverflow.com»
I understand that part, but maybe my question was not clear enough, so I'll try to explain : When the user selects an EntityType I would like to be able to pass all the EntityFields of that entity as selectable list in DisplayMember and ValueMember. – Than Jan 18 at 11:17 See my edit, maybe it will help you... – Shimrod Jan 18 at 11:33.stackoverflow.com»
Net Framework supports customizing design time behavior in several ways. One way to feed properties and values to the property window is by TypeConverter objects. You may be able to get this to work by implementing a custom TypeConverter, but it would also require you to decorate all the classes they could possibly select and provide type converters for each.
You can exert extensive control over just about any aspect of design time behavior of a custom control by creating a custom designer. A custom designer would allow you to skip the semi-hack of modifying data entities for use by a UI control. Instead you could build your own code to explore entities (ex.By Reflection) and then populate the property window however you choose.
Creating custom designers is not trivial, and it is not well documented. This is a lot of work assuming you are not in the business of making controls for the retail market, but a custom designer is the way to go if you want a "professional" control that is not hacked and works with any data entities. Sure it would be a nice feature, but honestly, how many properties are even suitable candidates for these parameters.
I almost invariably have "Id" as a value member and display member is typically something on the order of "Name". Selecting (and remembering) fields for databinding tends to be trivial, and what you want to do could prove tedious and time consuming. But if you want to try... No one is going to show you how to do this step by step, and the relevant examples will be hard to find.
You are pretty much on your own when you venture into custom designers. Here is an overview paper of the technology to get you started on researching the techniques: msdn.microsoft.com/en-us/magazine/cc1640....stackoverflow.com»