![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
Hi Brian, You must instantiate the BackgroundImage class in the constructor of the class where you expose the property. public class MyControl : System.Web.UI.WebControls.WebControl { private BackgroundImage bgImage; public ExpandBox() { BgImage = new BackgroundImage(); //Do this! } public BackgroundImage BgImage { get{return bgImage;} set{bgImage = value;} } } [TypeConverter(typeof(ExpandableObjectConverter))] public class BackgroundImage { private string image; public string Image { get{return image;} set{image=value;} } } awhk ![]() "Brian Bugge" <bugge (AT) elvis (DOT) dk> wrote in message news:uoHAT6JPDHA.3768 (AT) tk2msftngp13 (DOT) phx.gbl... I'm writing a simple webcontrol, which has a property "BackgroundImage". This property has to be expandable, but it doesn't work ![]() Below is the class for the property. Can someone tell me what i might do wrong. [TypeConverterAttribute(typeof(ExpandableObjectConv erter))] public class BackgroundImage{ private string image; public string Image{ get{return image;} set{image=value;} } } Brian Bugge - Denmark |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |