Exposing custom properties in UserControl

0
0

Hi,

So I’m creating a UserControl and I need to expose some properties in the editor. Ordinarily (in WinForms), I simply declare the property to be public and it just works. But so far it doesn’t appear in WiseJ.

I tested it with Image and string.

Is there a special attribute I need to use?

Thanks,

John

  • You must to post comments
0
0

Here is an example. I made this custom carousel usercontrol

 

Attachment
  • You must to post comments
0
0

You can just go view the definition on any of the properties you want to mimic.

So for example you can add this to any user control to display the image browser

//
// Summary:
//     Returns or sets the theme name or URL for the image to display in the Wisej.Web.PictureBox.
//
// Returns:
//     The theme name or URL for the image to display in the Wisej.Web.PictureBox.
[Editor(“Wisej.Web.Design.ImageSourceEditor, Wisej.Web.Design”, typeof(UITypeEditor))]
[Localizable(true)]
[SRCategory(“CatAppearance”)]
[SRDescription(“PictureBoxImageLocationDescr”)]
[TypeConverter(“Wisej.Web.Design.ImageSourceConverter, Wisej.Web.Design”)]
public string ImageSource { get; set; }

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.