Problems of Defining an Expandable Property for a Web Control in the Designer.

Discussion in 'ASP .Net Web Controls' started by Laser Lu, Jun 2, 2004.

  1. Laser Lu

    Laser Lu Guest

    I created a web control with an expandable property, and exposed that property onto the property panel. However, a error occured when I clicked one of the nested properties on the property panel.
    That nested property has been associated with the ImageUrlEditor, but when I clicked that property, the editor can not be popped up, instead, an error was alerted. And, other nested properties can work properly
    My question is, whether the ImageUrlEditor can work properly for nested properties in the property panel

    Here is the code snippet

    public class MyImageButton : System.Web.UI.WebControls.Butto

    ..
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
    PersistenceMode(PersistenceMode.InnerProperty),
    Category("Appearance"),
    NotifyParentProperty(true),
    DefaultValue(null),
    Description("Set the image of the button displayed in normal cases.")]
    public virtual BackgroundImageSetting Imag

    ge

    return this.image


    ... // Other properties


    [TypeConverter(typeof(ExpandableObjectConverter))
    public class BackgroundImageSettin

    ..
    [Editor("System.Web.UI.Design.ImageUrlEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor)),
    NotifyParentProperty(true),
    DefaultValue(""),
    Description("Set the URL of the image file."),
    Category("Appearance"),
    RefreshProperties(RefreshProperties.Repaint),
    Bindable(true)
    public string Ur

    ge

    return this.url

    se

    this.url = value


    ... // Other nested properties
     
    Laser Lu, Jun 2, 2004
    #1
    1. Advertising

  2. Laser Lu

    Laser Lu Guest

    Help

    ----- Laser Lu wrote: ----

    I created a web control with an expandable property, and exposed that property onto the property panel. However, a error occured when I clicked one of the nested properties on the property panel.
    That nested property has been associated with the ImageUrlEditor, but when I clicked that property, the editor can not be popped up, instead, an error was alerted. And, other nested properties can work properly
    My question is, whether the ImageUrlEditor can work properly for nested properties in the property panel

    Here is the code snippet

    public class MyImageButton : System.Web.UI.WebControls.Butto

    ..
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
    PersistenceMode(PersistenceMode.InnerProperty),
    Category("Appearance"),
    NotifyParentProperty(true),
    DefaultValue(null),
    Description("Set the image of the button displayed in normal cases.")]
    public virtual BackgroundImageSetting Imag

    ge

    return this.image


    ... // Other properties


    [TypeConverter(typeof(ExpandableObjectConverter))
    public class BackgroundImageSettin

    ..
    [Editor("System.Web.UI.Design.ImageUrlEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor)),
    NotifyParentProperty(true),
    DefaultValue(""),
    Description("Set the URL of the image file."),
    Category("Appearance"),
    RefreshProperties(RefreshProperties.Repaint),
    Bindable(true)
    public string Ur

    ge

    return this.url

    se

    this.url = value


    ... // Other nested properties
     
    Laser Lu, Jun 4, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. johny smith
    Replies:
    8
    Views:
    419
    Peter Koch Larsen
    Jul 2, 2004
  2. Steve B.
    Replies:
    4
    Views:
    972
    Cheryl D Wise
    Jun 1, 2007
  3. Robert Wilson

    Expandable property runtime error

    Robert Wilson, Dec 10, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    129
    Robert Wilson
    Dec 12, 2003
  4. Alexander Higgins
    Replies:
    3
    Views:
    1,084
    Teemu Keiski
    Jul 30, 2007
  5. Alexander Higgins
    Replies:
    0
    Views:
    450
    Alexander Higgins
    Jul 21, 2007
Loading...

Share This Page