> 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.

# DxExtensions

The **DxExtensions** class provides helper methods useful for converting WPF resources to SharpDX resources.

For more information on SharpDX Resources, please see the educational resource [Using SharpDX for Custom Chart Rendering](/developer/desktop-sdk/guides/educational-resources/using-sharpdx-for-custom-chart-rendering).

## DxExtensions Helper Methods

| Method                                                                             | Description                                                    |
| ---------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [ToDxBrush()](/developer/desktop-sdk/references/common/charts/rendering/todxbrush) | Converts a WPF Brush to a SharpDX Brush                        |
| [ToVector2()](/developer/desktop-sdk/references/common/charts/rendering/tovector2) | Converts a System.Windows.Point structure to a SharpDX.Vector2 |