RenderTarget
Definition
A SharpDX Direct2D1 RenderTarget creates objects and exposes methods used for drawing in the chart area.
Notes:
- There are two RenderTarget’s used in a chart. This is important to understand when creating/destroying device resources. Please see the OnRenderTargetChanged() page for more information.
- For a walk through for using the SharpDX RenderTarget, please see the educational resource Using SharpDX for Custom Chart Rendering.
Property Value
A SharpDX.Direct2D1.RenderTarget
Syntax
RenderTarget
Warning: Each DirectX render target requires its own brushes. You must create brushes directly in OnRender() or using OnRenderTargetChanged(). If you do not, you will receive an error at run time similar to:
“A direct X error has occurred while rendering the chart: HRESULT: [0x88990015], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_RESOURCE_DOMAIN/WrongResourceDomain], Message: The resource was realized on the wrong render target. : Each DirectX render target requires its own brushes. You must create brushes directly in OnRender() or using OnRenderTargetChanged().
Please see OnRenderTargetChanged() for examples with brushes that need to be recalculated, or OnRender() for an example of recreating a static brush.

