# C1.Util.DX.Direct2D.DeviceContextRenderTarget.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_DeviceContextRenderTarget_Create_" data-uid="C1.Util.DX.Direct2D.DeviceContextRenderTarget.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_DeviceContextRenderTarget_Create_" data-uid="C1.Util.DX.Direct2D.DeviceContextRenderTarget.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_DeviceContextRenderTarget_Create_C1_Util_DX_Direct2D_Factory_C1_Util_DX_Direct2D_RenderTargetProperties__" data-uid="C1.Util.DX.Direct2D.DeviceContextRenderTarget.Create(C1.Util.DX.Direct2D.Factory,C1.Util.DX.Direct2D.RenderTargetProperties@)">Create(Factory, ref RenderTargetProperties)</h4>
<div class="markdown level1 summary"><p>Creates a render target that draws to a Windows Graphics Device Interface (GDI) device context.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DeviceContextRenderTarget Create(Factory factory, ref RenderTargetProperties properties)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, ByRef properties As RenderTargetProperties) As DeviceContextRenderTarget</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.Direct2D.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.RenderTargetProperties.html">RenderTargetProperties</a></td>
      <td><span class="parametername">properties</span></td>
      <td><p>The rendering mode, pixel format, remoting options, DPI information, and the minimum DirectX support required for hardware rendering.  To enable the device context (DC) render target to work with GDI, set the DXGI format to <a class="xref" href="C1.Util.DX.DXGI.Format.html#C1_Util_DX_DXGI_Format_B8G8R8A8_UNorm">B8G8R8A8_UNorm</a> and the alpha mode to <a class="xref" href="C1.Util.DX.Direct2D.AlphaMode.html#C1_Util_DX_Direct2D_AlphaMode_Premultiplied">Premultiplied</a> or D2D1_ALPHA_MODE_IGNORE. For more information about pixel formats, see  {{Supported Pixel  Formats and Alpha Modes}}.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.DeviceContextRenderTarget.html">DeviceContextRenderTarget</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
