S
Stefan Hoffmann
hi @all,
I have a control defining this Color property:
public Color GridColor { get; set; }
public bool ShouldSerializeGridColor()
{
return GridColor != Color.Magenta;
}
public void ResetGridColor()
{
GridColor = Color.Magenta;
}
But it is not displayed in the property editor. How can I apply a
default value to a non simple property?
Also the DefaultValue attribute does not work:
[Category("Appearance"),
Description("Color for grid."),
DefaultValue(GetType(Color), "Color.Red")]
public Color GridColor { get; set; }
mfG
--> stefan <--
I have a control defining this Color property:
public Color GridColor { get; set; }
public bool ShouldSerializeGridColor()
{
return GridColor != Color.Magenta;
}
public void ResetGridColor()
{
GridColor = Color.Magenta;
}
But it is not displayed in the property editor. How can I apply a
default value to a non simple property?
Also the DefaultValue attribute does not work:
[Category("Appearance"),
Description("Color for grid."),
DefaultValue(GetType(Color), "Color.Red")]
public Color GridColor { get; set; }
mfG
--> stefan <--