Back to Devexpress

WorkingTimeRule Class

wpf-devexpress-dot-xpf-dot-gantt-1ae6067c.md

latest2.3 KB
Original Source

WorkingTimeRule Class

Represents a working time rule.

Namespace : DevExpress.Xpf.Gantt

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

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public sealed class WorkingTimeRule :
    Freezable<WorkingTimeRule>
vb
Public NotInheritable Class WorkingTimeRule
    Inherits Freezable(Of WorkingTimeRule)

Remarks

Use the WorkingTimeRule object to define rules related to working time. Add the WorkingTimeRule objects to the WorkingTimeRuleCollection and pass the collection to the GanttView.WorkingTimeRules property.

Example

xaml
<dxgn:GanttControl ItemsSource="{Binding Tasks}">
    <dxgn:GanttControl.View>
        <dxgn:GanttView
            NonworkingDayDisplayMode="Show"
            NonworkingTimeDisplayMode="Show">
            <dxgn:GanttView.WorkingTimeRules>
                <dxgn:WorkingTimeRule Recurrence="{dxgn:Daily}" WorkingTime="9:0:0-13:0:0, 14:0:0-18:0:0" />
                <dxgn:WorkingTimeRule Recurrence="{dxgn:Weekly DayOfWeek=Thursday}" 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 DevExpress.Mvvm.UI.Native.Freezable<WorkingTimeRule> WorkingTimeRule

See Also

WorkingTimeRule Members

WorkdayRules

WorkingTimeRules

DevExpress.Xpf.Gantt Namespace