# C1.Util.DX.Direct2D.Effect.RegisterAndCreateCustom

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_Effect_RegisterAndCreateCustom_" data-uid="C1.Util.DX.Direct2D.Effect.RegisterAndCreateCustom*">RegisterAndCreateCustom Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_Effect_RegisterAndCreateCustom_" data-uid="C1.Util.DX.Direct2D.Effect.RegisterAndCreateCustom*"></a>
<h4 id="C1_Util_DX_Direct2D_Effect_RegisterAndCreateCustom__1_C1_Util_DX_Direct2D_Factory1_C1_Util_DX_Direct2D_DeviceContext_" data-uid="C1.Util.DX.Direct2D.Effect.RegisterAndCreateCustom``1(C1.Util.DX.Direct2D.Factory1,C1.Util.DX.Direct2D.DeviceContext)">RegisterAndCreateCustom&lt;T&gt;(Factory1, DeviceContext)</h4>
<div class="markdown level1 summary"><p>Registers, if necessary, and initializes a new instance of a custom <a class="xref" href="C1.Util.DX.Direct2D.Effect.html">Effect</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Effect RegisterAndCreateCustom&lt;T&gt;(Factory1 factory, DeviceContext deviceContext) where T : CustomEffect, new()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function RegisterAndCreateCustom(Of T As {CustomEffect, New})(factory As Factory1, deviceContext As DeviceContext) As Effect</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.Factory1.html">Factory1</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>The factory to register the effect.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.DeviceContext.html">DeviceContext</a></td>
      <td><span class="parametername">deviceContext</span></td>
      <td><p>The device context.</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.Effect.html">Effect</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="parametername">T</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
