wpf-devexpress-dot-xpf-dot-gantt-dot-ganttview-70cb0088.md
Provides access to a collection of workday rules. This is a dependency property.
Namespace : DevExpress.Xpf.Gantt
Assembly : DevExpress.Xpf.Gantt.v25.2.dll
NuGet Package : DevExpress.Wpf.Gantt
public WorkdayRuleCollection WorkdayRules { get; }
Public ReadOnly Property WorkdayRules As WorkdayRuleCollection
| Type | Description |
|---|---|
| WorkdayRuleCollection |
A WorkdayRuleCollection object that represents a collection of workday rules.
|
The GanttControl stores its workday rules within the WorkdayRules collection. This collection provides methods that allow you to add new and remove existing rules. Individual rules are represented by WorkdayRule objects.
The code sample below demonstrates how to define the working and nonworking day rules.
<dxgn:GanttControl ItemsSource="{Binding Tasks}">
<dxgn:GanttControl.View>
<dxgn:GanttView
NonworkingDayDisplayMode="Show"
NonworkingTimeDisplayMode="Show">
<dxgn:GanttView.WorkdayRules>
<dxgn:WorkdayRule IsWorkday="False" Recurrence="{dxgn:Yearly Day=1, Month=1}" />
<dxgn:WorkdayRule IsWorkday="True" Recurrence="{dxgn:Weekly DayOfWeek=Saturday, Interval=2}" />
</dxgn:GanttView.WorkdayRules>
</dxgn:GanttView>
</dxgn:GanttControl.View>
</dxgn:GanttControl>
See Also