# C1.Win.Input.Styles.BarStyle

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_Input_Styles_BarStyle" data-uid="C1.Win.Input.Styles.BarStyle" class="text-break">BarStyle Class
</h1>
  <div class="markdown level0 summary"><p>The <a class="xref" href="C1.Win.Input.Styles.BarStyle.html">BarStyle</a> class represents the styles for the Bar element of the <a class="xref" href="C1.Win.Input.C1ToggleSwitch.html">C1ToggleSwitch</a> control
which contains display attributes that determine the appearance of control.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="../C1.Win.10/C1.Win.Themes.StyledPropertyCollection.html">StyledPropertyCollection</a></div>
    <div class="level2"><a class="xref" href="../C1.Win.10/C1.Win.Themes.BaseStyle.html">BaseStyle</a></div>
    <div class="level3"><a class="xref" href="../C1.Win.10/C1.Win.Themes.BaseC1FrameworkStyle.html">BaseC1FrameworkStyle</a></div>
    <div class="level4"><a class="xref" href="C1.Win.Input.Styles.SwitchBaseStyle-1.html">SwitchBaseStyle</a>&lt;<a class="xref" href="C1.Win.Input.Styles.ItemBaseStyle.html">ItemBaseStyle</a>&gt;</div>
    <div class="level5"><span class="xref">BarStyle</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.Input.Styles.html">C1.Win.Input.Styles</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.Input.10.dll</h6>
  <h5 id="C1_Win_Input_Styles_BarStyle_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class BarStyle : SwitchBaseStyle&lt;ItemBaseStyle&gt;, INotifyPropertyChanged, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class BarStyle
    Inherits SwitchBaseStyle(Of ItemBaseStyle)
    Implements INotifyPropertyChanged, IDisposable</code></pre>
  </div>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Input_Styles_BarStyle_Margins" data-uid="C1.Win.Input.Styles.BarStyle.Margins">
          <a class="xref" href="C1.Win.Input.Styles.BarStyle.Margins.html#C1_Win_Input_Styles_BarStyle_Margins">Margins</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the thickness of the margins around the element.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Input_Styles_BarStyle_ResetMargins" data-uid="C1.Win.Input.Styles.BarStyle.ResetMargins">
          <a class="xref" href="C1.Win.Input.Styles.BarStyle.ResetMargins.html#C1_Win_Input_Styles_BarStyle_ResetMargins">ResetMargins()</a>
        </td>
        <td class="markdown level1 summary"><p>Restores the default value of the <a class="xref" href="C1.Win.Input.Styles.BarStyle.Margins.html#C1_Win_Input_Styles_BarStyle_Margins">Margins</a> property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Input_Styles_BarStyle_ShouldSerializeMargins" data-uid="C1.Win.Input.Styles.BarStyle.ShouldSerializeMargins">
          <a class="xref" href="C1.Win.Input.Styles.BarStyle.ShouldSerializeMargins.html#C1_Win_Input_Styles_BarStyle_ShouldSerializeMargins">ShouldSerializeMargins()</a>
        </td>
        <td class="markdown level1 summary"><p>Specifies whether to save the value of the <a class="xref" href="C1.Win.Input.Styles.BarStyle.Margins.html#C1_Win_Input_Styles_BarStyle_Margins">Margins</a> property.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
