# C1.WPF.Extensions.GetVisualStateGroup

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Extensions_GetVisualStateGroup_" data-uid="C1.WPF.Extensions.GetVisualStateGroup*">GetVisualStateGroup Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Extensions_GetVisualStateGroup_" data-uid="C1.WPF.Extensions.GetVisualStateGroup*"></a>
<h4 id="C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_" data-uid="C1.WPF.Extensions.GetVisualStateGroup(System.Windows.FrameworkElement,System.String)">GetVisualStateGroup(FrameworkElement, string)</h4>
<div class="markdown level1 summary"><p>Gets the VisualStateGroup with the given name, looking up the visual tree</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static VisualStateGroup GetVisualStateGroup(this FrameworkElement root, string groupName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetVisualStateGroup(root As FrameworkElement, groupName As String) As VisualStateGroup</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.frameworkelement">FrameworkElement</a></td>
      <td><span class="parametername">root</span></td>
      <td><p>Element to start from</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">groupName</span></td>
      <td><p>Name of the group to look 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.visualstategroup">VisualStateGroup</a></td>
      <td><p>The group, if found, or null</p>
</td>
    </tr>
  </tbody>
</table>
</div>
