# C1.WPF.AutomationPeerFactory.CreateAutomationPeer

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_AutomationPeerFactory_CreateAutomationPeer_" data-uid="C1.WPF.AutomationPeerFactory.CreateAutomationPeer*">CreateAutomationPeer Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_AutomationPeerFactory_CreateAutomationPeer_" data-uid="C1.WPF.AutomationPeerFactory.CreateAutomationPeer*"></a>
<h4 id="C1_WPF_AutomationPeerFactory_CreateAutomationPeer_System_Object_System_Type_" data-uid="C1.WPF.AutomationPeerFactory.CreateAutomationPeer(System.Object,System.Type)">CreateAutomationPeer(object, Type)</h4>
<div class="markdown level1 summary"><p>Creates an instance of AutomationPeer class for given C1 control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AutomationPeer CreateAutomationPeer(object peerOwner, Type ownerType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function CreateAutomationPeer(peerOwner As Object, ownerType As Type) As AutomationPeer</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.object">object</a></td>
      <td><span class="parametername">peerOwner</span></td>
      <td><p>Owner control.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">ownerType</span></td>
      <td><p>Type of the owner control.</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.automation.peers.automationpeer">AutomationPeer</a></td>
      <td><p>The automation peer object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_AutomationPeerFactory_CreateAutomationPeer_" data-uid="C1.WPF.AutomationPeerFactory.CreateAutomationPeer*"></a>
<h4 id="C1_WPF_AutomationPeerFactory_CreateAutomationPeer_System_Object_System_Type_System_Windows_Controls_Control_" data-uid="C1.WPF.AutomationPeerFactory.CreateAutomationPeer(System.Object,System.Type,System.Windows.Controls.Control)">CreateAutomationPeer(object, Type, Control)</h4>
<div class="markdown level1 summary"><p>Creates an instance of AutomationPeer class for given C1 control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static AutomationPeer CreateAutomationPeer(object peerOwner, Type ownerType, Control owningSelectorControl)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function CreateAutomationPeer(peerOwner As Object, ownerType As Type, owningSelectorControl As Control) As AutomationPeer</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.object">object</a></td>
      <td><span class="parametername">peerOwner</span></td>
      <td><p>Owner control.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">ownerType</span></td>
      <td><p>Type of the owner control.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></td>
      <td><span class="parametername">owningSelectorControl</span></td>
      <td><p>Reference to the owning Selector control. It's required if AutomationPeer is inherited from the SelectorItemAutomationPeer.</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.automation.peers.automationpeer">AutomationPeer</a></td>
      <td><p>The automation peer object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
