In the SetDefaults section of OnStateChange, if I set LineColor = Brushes.Red, indicator works fine.
However, if I set using the FromRgb method,
LineColor = new SolidColorBrush(Color.FromRgb(100, 125, 150));
Error on getting value for property 'LineColor'. The calling thread cannot access this object because a different thread owns it.
I think the issue is with assigning SolidColorBrush to the property during initialization.
How do I fix it ?
[NinjaScriptProperty]
[XmlIgnore()]
[Display(Name = "Line Color", Order = 1, GroupName = "Settings")]
public Brush LineColor
{
get; set;
}
[Browsable(false)]
public string LineColor_Serialize
{
get { return Serialize.BrushToString(this.LineColor); }
set { this.LineColor = Serialize.StringToBrush(value); }
}

Comment