# C1.Util.DX.Direct2D.Layer.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_Layer_Create_" data-uid="C1.Util.DX.Direct2D.Layer.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_Layer_Create_" data-uid="C1.Util.DX.Direct2D.Layer.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_" data-uid="C1.Util.DX.Direct2D.Layer.Create(C1.Util.DX.Direct2D.RenderTarget)">Create(RenderTarget)</h4>
<div class="markdown level1 summary"><p>Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size. The layer resource is allocated to the minimum size when {{PushLayer}} is called.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Layer Create(RenderTarget renderTarget)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget) As Layer</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.RenderTarget.html">RenderTarget</a></td>
      <td><span class="parametername">renderTarget</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.Direct2D.RenderTarget.html">RenderTarget</a></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.Layer.html">Layer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Regardless of whether a size is initially specified, the layer automatically resizes as needed.</p>
</div>


<a id="C1_Util_DX_Direct2D_Layer_Create_" data-uid="C1.Util.DX.Direct2D.Layer.Create*"></a>
<h4 id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_System_Nullable_C1_Util_DX_Size2F__" data-uid="C1.Util.DX.Direct2D.Layer.Create(C1.Util.DX.Direct2D.RenderTarget,System.Nullable{C1.Util.DX.Size2F})">Create(RenderTarget, Size2F?)</h4>
<div class="markdown level1 summary"><p>Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Layer Create(RenderTarget renderTarget, Size2F? size)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(renderTarget As RenderTarget, size As Size2F?) As Layer</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.RenderTarget.html">RenderTarget</a></td>
      <td><span class="parametername">renderTarget</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.Direct2D.RenderTarget.html">RenderTarget</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Size2F.html">Size2F</a>?</td>
      <td><span class="parametername">size</span></td>
      <td><p>If (0, 0) is specified, no backing store is created behind the layer resource. The layer resource is allocated to the minimum size when {{PushLayer}} is called.</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.Layer.html">Layer</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_System_Nullable_C1_Util_DX_Size2F___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Regardless of whether a size is initially specified, the layer automatically resizes as needed.</p>
</div>
</div>
