# C1.Win.Themes.C1Theme.ApplyThemeToObject

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Themes_C1Theme_ApplyThemeToObject_" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToObject*">ApplyThemeToObject Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Themes_C1Theme_ApplyThemeToObject_" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToObject*"></a>
<h4 id="C1_Win_Themes_C1Theme_ApplyThemeToObject_System_Object_" data-uid="C1.Win.Themes.C1Theme.ApplyThemeToObject(System.Object)">ApplyThemeToObject(object)</h4>
<div class="markdown level1 summary"><p>Applies a theme to an object.</p>
<p>The target object must be either a C1 control supporting themes,
or a standard control (such as Button, Label etc)
for which basic theming is provided by this library.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool ApplyThemeToObject(object obj)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ApplyThemeToObject(obj As Object) As Boolean</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">obj</span></td>
      <td><p>The object to apply the theme to.</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.boolean">bool</a></td>
      <td><p>True of the theme was successfully applied, false otherwise (i.e. if the object does not support theming).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
