# C1.WPF.VTreeHelper.GetChildOfType

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_VTreeHelper_GetChildOfType_" data-uid="C1.WPF.VTreeHelper.GetChildOfType*">GetChildOfType Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_VTreeHelper_GetChildOfType_" data-uid="C1.WPF.VTreeHelper.GetChildOfType*"></a>
<h4 id="C1_WPF_VTreeHelper_GetChildOfType_System_Windows_DependencyObject_System_Type_" data-uid="C1.WPF.VTreeHelper.GetChildOfType(System.Windows.DependencyObject,System.Type)">GetChildOfType(DependencyObject, Type)</h4>
<div class="markdown level1 summary"><p>Returns the first child visual object of the specified type within a specified parent.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static DependencyObject GetChildOfType(DependencyObject reference, Type type)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetChildOfType(reference As DependencyObject, type As Type) As DependencyObject</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.windows.dependencyobject">DependencyObject</a></td>
      <td><span class="parametername">reference</span></td>
      <td><p>The parent visual, referenced as a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.dependencyobject">DependencyObject</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a> of the children element to search for.</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.dependencyobject">DependencyObject</a></td>
      <td><p>The visual object of the specified type.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
