R
Ray
I have a WebControl which contains another WebControl. Both have an ImageUrl property, code see below
In the property grid the ImageUrlEditor works on the parent control but not on the subcontrol's expanded property
This may or may not be related with the problem that other subproperties are not refreshed automatically and that the subproperty's designer is never called
Thanks for any suggestions
Ra
namespace Test
[ ParseChildren(false)
ToolboxData("<{0}:TestControl runat=server></{0}:TestControl>")
public class TestControl : System.Web.UI.WebControls.WebContro
private Tests.SubControl tsc = new SubControl()
private string mstrImageUrl = string.Empty
[ Description("Test subproperty.")
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
PersistenceMode(PersistenceMode.InnerProperty)
public Tests.SubControl SubControl
get { return tsc;
set { tsc = value;
[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor),typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { EmstrImageUrl = value;
} //END public class TestContro
public class SubControl : System.Web.UI.WebControls.WebContro
private string mstrImageUrl = string.Empty
[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor),typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { mstrImageUrl = value;
} //END public class SubContro
} //END namespace Tests
In the property grid the ImageUrlEditor works on the parent control but not on the subcontrol's expanded property
This may or may not be related with the problem that other subproperties are not refreshed automatically and that the subproperty's designer is never called
Thanks for any suggestions
Ra
namespace Test
[ ParseChildren(false)
ToolboxData("<{0}:TestControl runat=server></{0}:TestControl>")
public class TestControl : System.Web.UI.WebControls.WebContro
private Tests.SubControl tsc = new SubControl()
private string mstrImageUrl = string.Empty
[ Description("Test subproperty.")
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
PersistenceMode(PersistenceMode.InnerProperty)
public Tests.SubControl SubControl
get { return tsc;
set { tsc = value;
[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor),typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { EmstrImageUrl = value;
} //END public class TestContro
public class SubControl : System.Web.UI.WebControls.WebContro
private string mstrImageUrl = string.Empty
[ DefaultValue("")
Editor(typeof(System.Web.UI.Design.ImageUrlEditor),typeof(System.Drawing.Design.UITypeEditor))
public string ImageUrl
get { return mstrImageUrl;
set { mstrImageUrl = value;
} //END public class SubContro
} //END namespace Tests