Back to Devexpress

YearlyByDayOfWeek Class

wpf-devexpress-dot-xpf-dot-gantt-91d45e10.md

latest2.4 KB
Original Source

YearlyByDayOfWeek Class

Represents the yearly recurrence in a particular day of week.

Namespace : DevExpress.Xpf.Gantt

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

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public sealed class YearlyByDayOfWeek :
    RecurrenceByDayOfWeek
vb
Public NotInheritable Class YearlyByDayOfWeek
    Inherits RecurrenceByDayOfWeek

Remarks

Use the YearlyByDayOfWeek object to define that the rule reoccurs on a yearly basis in a particular month and day of week.

Use the Month, DayOfWeek, and Week properties to specify a month, a day of week, and a number 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>
                <!-- Marks as a nonworking the day when the Thanksgiving (United States) is celebrated -->
                <dxgn:WorkdayRule IsWorkday="False" Recurrence="{dxgn:YearlyByDayOfWeek Month=11, DayOfWeek=Thursday, Week=4}" />
            </dxgn:GanttView.WorkdayRules>
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>

Inheritance

Object DispatcherObject DependencyObject Freezable RecurrenceBase Recurrence RecurrenceByDayOfWeek YearlyByDayOfWeek

See Also

YearlyByDayOfWeek Members

DevExpress.Xpf.Gantt Namespace