# C1.WPF.CustomConverter.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_CustomConverter_Create_" data-uid="C1.WPF.CustomConverter.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_CustomConverter_Create_" data-uid="C1.WPF.CustomConverter.Create*"></a>
<h4 id="C1_WPF_CustomConverter_Create_System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object__" data-uid="C1.WPF.CustomConverter.Create(System.Func{System.Object,System.Type,System.Object,System.Globalization.CultureInfo,System.Object})">Create(Func&lt;object, Type, object, CultureInfo, object&gt;)</h4>
<div class="markdown level1 summary"><p>Creates the specified converter function.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IValueConverter Create(Func&lt;object, Type, object, CultureInfo, object&gt; converterFunction)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(converterFunction As Func(Of Object, Type, Object, CultureInfo, Object)) As IValueConverter</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="https://learn.microsoft.com/dotnet/api/system.func-5">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo">CultureInfo</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">converterFunction</span></td>
      <td><p>The converter function. (value, type, parameter, culture)</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="https://learn.microsoft.com/dotnet/api/system.windows.data.ivalueconverter">IValueConverter</a></td>
      <td><p>The converted value</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_CustomConverter_Create_System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object___examples">Examples</h5>
<pre><code class="lang-csharp">var converter = CustomConverter.Create((value, type, parameter, culture)=&gt;
{
    return; //Put the converter code here
});</code></pre>



<a id="C1_WPF_CustomConverter_Create_" data-uid="C1.WPF.CustomConverter.Create*"></a>
<h4 id="C1_WPF_CustomConverter_Create_System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object__System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object__" data-uid="C1.WPF.CustomConverter.Create(System.Func{System.Object,System.Type,System.Object,System.Globalization.CultureInfo,System.Object},System.Func{System.Object,System.Type,System.Object,System.Globalization.CultureInfo,System.Object})">Create(Func&lt;object, Type, object, CultureInfo, object&gt;, Func&lt;object, Type, object, CultureInfo, object&gt;)</h4>
<div class="markdown level1 summary"><p>Creates the specified converter function.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IValueConverter Create(Func&lt;object, Type, object, CultureInfo, object&gt; converterFunction, Func&lt;object, Type, object, CultureInfo, object&gt; converterBackFunction)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(converterFunction As Func(Of Object, Type, Object, CultureInfo, Object), converterBackFunction As Func(Of Object, Type, Object, CultureInfo, Object)) As IValueConverter</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="https://learn.microsoft.com/dotnet/api/system.func-5">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo">CultureInfo</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">converterFunction</span></td>
      <td><p>The converter function. (value, type, parameter, culture)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-5">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo">CultureInfo</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">converterBackFunction</span></td>
      <td><p>The convert back function. (value, type, parameter, culture)</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="https://learn.microsoft.com/dotnet/api/system.windows.data.ivalueconverter">IValueConverter</a></td>
      <td><p>The converted value</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_CustomConverter_Create_System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object__System_Func_System_Object_System_Type_System_Object_System_Globalization_CultureInfo_System_Object___examples">Examples</h5>
<pre><code class="lang-csharp">var converter = CustomConverter.Create((value, type, parameter, culture)=&gt;
{
    return; //Put the converter code here
});</code></pre>

</div>
