ReferencesChart StyleUpBrushDXAsk a question|Copy page|View as Markdown|More actionsDefinition A SharpDX Brush object used to paint the up bars for the ChartStyle. Property Value A SharpDX Brush object used to paint the up bars Syntax UpBrushDX Examples 1protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars) 2{ 3 for (int idx = chartBars.FromIndex; idx <= chartBars.ToIndex; idx++) 4 { 5 double closeValue = bars.GetClose(idx); 6 double openValue = bars.GetOpen(idx); 7 8 // Set the brush of the current candle to UpBrushDX or DownBrushDX, depending on the 9 // bar direction 10 Brush brush = closeValue >= openValue ? UpBrushDX : DownBrushDX; 11 } 12}