Back to Devexpress

Weekly.DayOfWeek Property

wpf-devexpress-dot-xpf-dot-gantt-dot-weekly.md

latest1.7 KB
Original Source

Weekly.DayOfWeek Property

Gets or sets a day of week when the rule is applied. This is a dependency property.

Namespace : DevExpress.Xpf.Gantt

Assembly : DevExpress.Xpf.Gantt.v25.2.dll

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public DaysOfWeek DayOfWeek { get; set; }
vb
Public Property DayOfWeek As DaysOfWeek

Property Value

TypeDescription
DevExpress.Mvvm.DaysOfWeek

A day of week.

|

Remarks

Use the DayOfWeek property to specify a day of week when the rule is applied.

Example

xaml
<dxgn:GanttControl ItemsSource="{Binding Tasks}">
    <dxgn:GanttControl.View>
        <dxgn:GanttView
            NonworkingDayDisplayMode="Show"
            NonworkingTimeDisplayMode="Show">
            <dxgn:GanttView.WorkdayRules>
                <!-- Applies to every Friday -->
                <dxgn:WorkdayRule IsWorkday="False" Recurrence="{dxgn:Weekly DayOfWeek=Friday}" />
                <!-- Applies to every second Saturday -->
                <dxgn:WorkdayRule IsWorkday="False" Recurrence="{dxgn:Weekly DayOfWeek=Saturday, Interval=2}" />
            </dxgn:GanttView.WorkdayRules>
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>

See Also

Weekly Class

Weekly Members

DevExpress.Xpf.Gantt Namespace