开发者

Show suggestion in VS property window for a custom control property

开发者 https://www.devze.com 2023-01-17 10:19 出处:网络
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 DataSourc

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消