Back to Devexpress

StripLineRule.Recurrence Property

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

latest2.3 KB
Original Source

StripLineRule.Recurrence Property

Gets or sets the strip line rule recurrence (weekly, daily, etc.). This is a dependency property.

Namespace : DevExpress.Xpf.Gantt

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

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public RecurrenceBase Recurrence { get; set; }
vb
Public Property Recurrence As RecurrenceBase

Property Value

TypeDescription
RecurrenceBase

A RecurrenceBase descendant that specify the strip line rule recurrence.

|

Remarks

The Recurrence property allows you to specify the day when each of the rule’s strip lines are displayed. Use the StartOffset property to specify the time when each of the rule’s strip lines are displayed.

Example

The code sample below demonstrates a rule that generates strip lines each Friday in the year 2019. Strip lines’ start time is 8.00 a.m, and duration is 8 hours.

xaml
<Window ...
    xmlns:dxgn="http://schemas.devexpress.com/winfx/2008/xaml/gantt" />

<dxgn:GanttControl ItemsSource="{Binding Tasks}" >
    <dxgn:GanttControl.View>
        <dxgn:GanttView
            x:Name="view" ... >
            <dxgn:GanttView.StripLines>
                <dxgn:StripLineRule 
                    Duration="8:0:0"
                    Recurrence="{dxgn:Weekly DayOfWeek=Friday, Start=1/1/2019, Until=12/31/2019}"
                    StartOffset="8:0:0"/>
            </dxgn:GanttView.StripLines>
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>
</Window>

See Also

Working and Non-Working Time Ranges

StripLineRule Class

StripLineRule Members

DevExpress.Xpf.Gantt Namespace