# C1.WPF.Schedule.TimeSlotGroupStyleSelector

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Schedule_TimeSlotGroupStyleSelector" data-uid="C1.WPF.Schedule.TimeSlotGroupStyleSelector" class="text-break">TimeSlotGroupStyleSelector Class
</h1>
  <div class="markdown level0 summary"><p>This class provides a way to apply time slot group styles for working/free hours
in DayView/WorkWeekView modes.</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"><span class="xref">TimeSlotGroupStyleSelector</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Schedule.html">C1.WPF.Schedule</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Schedule.4.6.2.dll</h6>
  <h5 id="C1_WPF_Schedule_TimeSlotGroupStyleSelector_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class TimeSlotGroupStyleSelector : C1StyleSelector</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class TimeSlotGroupStyleSelector
    Inherits C1StyleSelector</code></pre>
  </div>
  <h5 id="C1_WPF_Schedule_TimeSlotGroupStyleSelector_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>For the sample of using look at OneDayStyleBase in generic.xaml.
<ol><li><p>Create an instance of this class:</p><p> &lt;local:TimeSlotGroupStyleSelector x:Key=&quot;TimeSlotGroupStyleSelector&quot;/&gt;</p></li><li>
Define two group styles:
<ul><li>
with the key &quot;PART_C1Scheduler_WorkHour_Style&quot; for work hours;
</li><li>
with the key &quot;PART_C1Scheduler_FreeHour_Style&quot; for free hours.<br>
</li></ul></li><li><p>Specify style selector in the group definition:</p><p> &lt;GroupStyle ContainerStyleSelector=&quot;{StaticResource TimeSlotGroupStyleSelector}&quot;&gt;</p></li></ol>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Schedule_TimeSlotGroupStyleSelector__ctor" data-uid="C1.WPF.Schedule.TimeSlotGroupStyleSelector.#ctor">
          <a class="xref" href="C1.WPF.Schedule.TimeSlotGroupStyleSelector.-ctor.html#C1_WPF_Schedule_TimeSlotGroupStyleSelector__ctor">TimeSlotGroupStyleSelector()</a>
        </td>
        <td class="markdown level1 summary"></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_WPF_Schedule_TimeSlotGroupStyleSelector_SelectStyle_System_Object_System_Windows_DependencyObject_" data-uid="C1.WPF.Schedule.TimeSlotGroupStyleSelector.SelectStyle(System.Object,System.Windows.DependencyObject)">
          <a class="xref" href="C1.WPF.Schedule.TimeSlotGroupStyleSelector.SelectStyle.html#C1_WPF_Schedule_TimeSlotGroupStyleSelector_SelectStyle_System_Object_System_Windows_DependencyObject_">SelectStyle(object, DependencyObject)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.style">Style</a> object for the specified group if it is found in resources.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
