I defined a parameter inside "Properties" on my strategy code to be able to set a specific color for a Rectangle object:
[XmlIgnore]
[Display(Name="Color for InfoWindow Background", Description="Set the background color for the InfoWindow", Order=1, GroupName="InfoWindow")]
public Brush InfoWindowBackgroundColor
{ get; set; }
[Browsable(false)]
public string BarColorUpSerializable
{
get { return Serialize.BrushToString(InfoWindowBackgroundColor) ; }
set { InfoWindowBackgroundColor = Serialize.StringToBrush(value); }
}
Now, Im creating this Rectangle inside OnRender() like this:
using (SharpDX.Direct2D1.SolidColorBrush dxBrush = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.Blue))
{
RenderTarget.FillRectangle(new SharpDX.RectangleF(9, ChartPanel.H - 230, 290, 200), dxBrush);
}
My question is, how I could use the color defined on InfoWindowBackgroundColor as an input to define the color of the Rectangle that I created with OnRender. How I could make the translation from Brush to the color I defined with SolidColorBrush(RenderTarget, SharpDX.Color.Blue
Thank you!

Comment