# C1.Maui.Core.ViewEx.SetStyle

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Maui_Core_ViewEx_SetStyle_" data-uid="C1.Maui.Core.ViewEx.SetStyle*">SetStyle Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Maui_Core_ViewEx_SetStyle_" data-uid="C1.Maui.Core.ViewEx.SetStyle*"></a>
<h4 id="C1_Maui_Core_ViewEx_SetStyle_Microsoft_Maui_Controls_View_Microsoft_Maui_Controls_Style_" data-uid="C1.Maui.Core.ViewEx.SetStyle(Microsoft.Maui.Controls.View,Microsoft.Maui.Controls.Style)">SetStyle(View, Style)</h4>
<div class="markdown level1 summary"><p>Sets <span class="xref">Microsoft.Maui.Controls.Style</span> to the specified <span class="xref">Microsoft.Maui.Controls.View</span></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void SetStyle(this View view, Style style)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub SetStyle(view As View, style As Style)</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><span class="xref">View</span></td>
      <td><span class="parametername">view</span></td>
      <td><p>Affected <span class="xref">Microsoft.Maui.Controls.View</span>.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Style</span></td>
      <td><span class="parametername">style</span></td>
      <td><p><span class="xref">Microsoft.Maui.Controls.Style</span> to set.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
