Reputation: 18031
I am writing a class whose properties are accessed through a property panel, one of these properties is a multiline text.
I want a dropdown to be displayed in the designer of this property panel so that the user fills out a multiline text, the same way a Label or the a TextBox does in Visual Studio.
Which attribute should I put above my property definition to allow this ?
Upvotes: 3
Views: 725
Reputation: 6689
You want to decorate the "Text" property with System.ComponentModel.Design.MultilineStringEditor.
e.g.
[Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public string Text { .... }
Upvotes: 2