L
Laser Lu
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
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