I'm creating a control with properties of type System.Net.IPAddress
. The designer shows these as read-only, and seems to be matching them up with resources. Is there a way to make it so that the user can edit these properties in the designer properties window, rather than having to open up the resource editor?
views:
74answers:
1
+1
A:
Found it - the answer is to fake it:
[Browsable(true)]
[DisplayName("IPAddress")]
public string IPAddressText
{
get { return this.IPAddress.ToString(); }
set { this.IPAddress = IPAddress.Parse(value); }
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IPAddress IPAddress
{
get;
set;
}
Simon
2009-06-18 09:02:04