Property String Editor

0
0

Hi Teams,

I have defined a string property for my custom control.

Private _AppTitle As String = “TITLE”
<Browsable(True), NotifyParentProperty(True),
Editor(“System.ComponentModel.Design.MultilineStringEditor”, GetType(UITypeEditor))>
Public Property AppTitle As String
Get
Return _AppTitle
End Get
Set(value As String)
lblTitle.Text = value
RaiseEvent PropertyChanged()
End Set
End Property

At design time in the property grid i have a combo that show an editor box.

My question is if it’s possible to show instead an editor form like when set the cssstyle property.

 

Thanks

 

  • You must to post comments
0
0

Forgot, if you want to use the editors built-in wisej, do this:

[Editor(“Wisej.Design.CodeEditor, Wisej.Framework.Design, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17bef35e11b84171”, “System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)]

Change the version for Wisej to 2.0.0.0 if using Wisej 2.5.

For an image source string:

[Editor(“Wisej.Design.ImageSourceEditor, Wisej.Framework.Design, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17bef35e11b84171”, “System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)]
[TypeConverter(“Wisej.Design.ImageSourceConverter, Wisej.Framework.Design, Version=3.0.0.0, Culture=neutral, PublicKeyToken=17bef35e11b84171”)]

 

 

  • Angelo Bordonaro
    thanks Luca, That’s exactly what I wanted
  • You must to post comments
0
0

Yes, you have to create your editor.  Look for UITypeEditor examples online. There are many. You can define the type of editor:DropDown or Modal. You can draw in the little square preview, etc. It’s all standard System.ComponentModel and System.Drawing.Design.

https://stackoverflow.com/questions/36577901/c-sharp-uitypeeditor-with-parameter

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.