Show suggestion in VS property window for a custom control property
I have developed a custom control with two public property called ListField and DataSource.
ListFiel开发者_Go百科d property must be set to the name of a property of the object contained in DataSource.
It's possible to configure ListField in a way that when setting the properties in Visual Studio property window, I get a list suggesting the values of all properties in the DataSource object?
You could use EditorAttribute
to define a custom editor for your property (at design time).
Here's some links:
- Walkthrough: Implementing UITypeEditor (MSDN)
- How To: Create a Windows Forms Control That Takes Advantage of Design-Time Features (MSDN)
精彩评论