Back to Devexpress

MonthlyByDayOfWeek Class

wpf-devexpress-dot-xpf-dot-gantt-8eca50b7.md

latest2.4 KB
Original Source

MonthlyByDayOfWeek Class

Represents the monthly 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 MonthlyByDayOfWeek :
    RecurrenceByDayOfWeek
vb
Public NotInheritable Class MonthlyByDayOfWeek
    Inherits RecurrenceByDayOfWeek

Remarks

Use the MonthlyByDayOfWeek object to define that the rule reoccurs on a monthly basis in a particular day of week.

Use the DayOfWeek and Week properties to specify a day of week and 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.WorkingTimeRules>
                <!-- The rule applies to the second week's monday of each month -->
                <dxgn:WorkingTimeRule 
                    Recurrence="{dxgn:MonthlyByDayOfWeek DayOfWeek=Monday, Week=2}" 
                    WorkingTime="9:0:0-13:0:0, 14:0:0-17:0:0" />
            </dxgn:GanttView.WorkingTimeRules>
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>

Inheritance

Object DispatcherObject DependencyObject Freezable RecurrenceBase Recurrence RecurrenceByDayOfWeek MonthlyByDayOfWeek

See Also

MonthlyByDayOfWeek Members

DevExpress.Xpf.Gantt Namespace