> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# UpBrush

## Definition

A [Brush](https://msdn.microsoft.com/en-us/library/system.windows.media.brush\(v=vs.110\).aspx) object used to determine the color to paint the up bars for the ChartStyle.

This Windows Presentation Forms (WPF) implementation of the Brush class is not directly used to paint bars on the chart. Instead it is converted to a SharpDX Brush in the [UpBrushDX](/developer/desktop-sdk/references/chart-style/upbrushdx) property. This property is used to capture user input for changing brush colors.

## Property  Value

A [WPF](https://msdn.microsoft.com/en-us/library/ms754130\(v=vs.110\).aspx) Brush object used to paint the up bars

## Syntax

`UpBrush`

## Examples

```csharp
protected override void OnStateChange()  
{  
  if (State == State.Configure)  
  {  
      // Set a new name for the UpBrush property  
      SetPropertyName("UpBrush", "AdvancingBrush");  
  }  
}
```