How do I serialize DashStyle? When I save a workspace with this indi in it, it does not remember the DashStyle, but it does remember the Color.
here is my code snippet...
[XmlIgnore()] //this line ensures that this value will be saved/recovered when you restart the system
[Description(" Line Color")]
[GridCategory("Parameters")]
public Color Hlcolor
{
get { return hlcolor; }
set { hlcolor = value; }
}
// Serialize our Horizontal Line Color object
[Browsable(false)]
public string HlcolorSerialize
{
get { return NinjaTrader.Gui.Design.SerializableColor.ToString( hlcolor); }
set { hlcolor = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); }
}
//DashStyle
[XmlIgnore()] //this line ensures that this value will be saved/recovered when you restart the system
[Description(" Line Style")]
[GridCategory("Parameters")]
public DashStyle Hlstyle
{
get { return hlstyle; }
set { hlstyle = value; }
}
// Serialize our Horizontal Line Color object
[Browsable(false)]
public string HlstyleSerialize
{
get { return NinjaTrader.Gui.Design.SerializableDashStyle.ToStr ing(hlstyle); }
set { hlstyle = NinjaTrader.Gui.Design.SerializableDashStyle.FromS tring(value); }
}
Comment