# C1.WPF.Schedule.TimeSlotStyleSelector

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Schedule_TimeSlotStyleSelector" data-uid="C1.WPF.Schedule.TimeSlotStyleSelector" class="text-break">TimeSlotStyleSelector Class
</h1>
  <div class="markdown level0 summary"><p>This class provides a way to apply time slot 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">TimeSlotStyleSelector</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.dll</h6>
  <h5 id="C1_WPF_Schedule_TimeSlotStyleSelector_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class TimeSlotStyleSelector : C1StyleSelector</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class TimeSlotStyleSelector
    Inherits C1StyleSelector</code></pre>
  </div>
  <h5 id="C1_WPF_Schedule_TimeSlotStyleSelector_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>For the sample of using look at OneDayStyle in generic.xaml.
<ol><li>
<p>Create an instance of this class:</p>
<p> &lt;local:TimeSlotStyleSelector x:Key=&quot;TimeSlotStyleSelector&quot;/&gt;</p>
</li><li>
Define two styles:
<ul><li>
with the key &quot;C1Scheduler_WorkSlot_Style&quot; for work hours;
</li><li>
with the key &quot;C1Scheduler_FreeSlot_Style&quot; for free hours.<br>
</li></ul>
</li><li>
Define two optional styles:
<ul><li>
with the key &quot;C1Scheduler_TopWorkSlot_Style&quot; for the top slot in every work hour;
</li><li>
with the key &quot;C1Scheduler_TopFreeSlot_Style&quot; for the top slot in every free hour.<br>
</li></ul>
</li><li>
<p>Specify ItemContainerStyleSelector property for the <a class="xref" href="C1.WPF.Schedule.C1SchedulerPresenter.html">C1SchedulerPresenter</a> object:</p>
<p> &lt;local:C1SchedulerPresenter ItemContainerStyleSelector=&quot;{StaticResource TimeSlotTemplateSelector}&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_TimeSlotStyleSelector__ctor" data-uid="C1.WPF.Schedule.TimeSlotStyleSelector.#ctor">
          <a class="xref" href="C1.WPF.Schedule.TimeSlotStyleSelector.-ctor.html#C1_WPF_Schedule_TimeSlotStyleSelector__ctor">TimeSlotStyleSelector()</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_TimeSlotStyleSelector_SelectStyle_System_Object_System_Windows_DependencyObject_" data-uid="C1.WPF.Schedule.TimeSlotStyleSelector.SelectStyle(System.Object,System.Windows.DependencyObject)">
          <a class="xref" href="C1.WPF.Schedule.TimeSlotStyleSelector.SelectStyle.html#C1_WPF_Schedule_TimeSlotStyleSelector_SelectStyle_System_Object_System_Windows_DependencyObject_">SelectStyle(object, DependencyObject)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>

</div>
