# C1.Win.Themes.C1Theme.ApplyThemeToControlTree

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Themes_C1Theme_ApplyThemeToControlTree_" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToControlTree*">ApplyThemeToControlTree Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Themes_C1Theme_ApplyThemeToControlTree_" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToControlTree*"></a>
<h4 id="C1_Win_Themes_C1Theme_ApplyThemeToControlTree_System_Windows_Forms_Control_System_Predicate_System_Windows_Forms_Control__" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToControlTree(System.Windows.Forms.Control,System.Predicate{System.Windows.Forms.Control})">ApplyThemeToControlTree(Control, Predicate&lt;Control&gt;)</h4>
<div class="markdown level1 summary"><p>Recursively applies a theme to a control and its children.
Controls that do not support themes are ignored (but the theme is applied to their children).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ApplyThemeToControlTree(Control root, Predicate&lt;Control&gt; applyThemeToSubTree = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ApplyThemeToControlTree(root As Control, Optional applyThemeToSubTree As Predicate(Of Control) = Nothing)</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.forms.control">Control</a></td>
      <td><span class="parametername">root</span></td>
      <td><p>The root control to apply the theme to.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.predicate-1">Predicate</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a>&gt;</td>
      <td><span class="parametername">applyThemeToSubTree</span></td>
      <td><p>Predicate which, if specified,
allows to break theme application on certain nodes in the tree if it returns false.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
