Skip to content

Exposing custom properties in UserControl #1256

Closed

Description

@itg-assistant

John Nagle asked 2017-12-12 18:23:25 UTC

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

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Mark Reed answered 2017-12-12 22:47:32 UTC

    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; }

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Mark Reed answered 2017-12-12 22:52:07 UTC

    Here is an example. I made this custom carousel usercontrol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions