This class provides a way to choose a DataTemplate for the VisualInterval
object representing the single time slot in DayView/WorkWeekView modes.
Namespace:
C1.WPF.C1ScheduleAssembly: C1.WPF.C1Schedule (in C1.WPF.C1Schedule.dll)
Syntax
C# |
---|
public class TimeSlotTemplateSelector : DataTemplateSelector |
Visual Basic (Declaration) |
---|
Public Class TimeSlotTemplateSelector _ Inherits DataTemplateSelector |
Remarks
For the sample of using look at OneDayStyleBase in generic.xaml.
Create an instance of this class:
<local:TimeSlotTemplateSelector x:Key="TimeSlotTemplateSelector"/>
-
Define two DataTemplates:
- with the key "PART_C1Scheduler_FreeSlot_Template" for free time;
- with the key "PART_C1Scheduler_WorkSlot_Template" for working time.
Specify ItemTemplateSelector for the C1SchedulerPresenter object:
<local:C1SchedulerPresenter ItemTemplateSelector="{StaticResource TimeSlotTemplateSelector}" />
Inheritance Hierarchy
System..::..Object
System.Windows.Controls..::..DataTemplateSelector
C1.WPF.C1Schedule..::..TimeSlotTemplateSelector
System.Windows.Controls..::..DataTemplateSelector
C1.WPF.C1Schedule..::..TimeSlotTemplateSelector