Back to Devexpress

SchedulerControl.GetTimeRegions(DateTimeRange, Boolean) Method

wpf-devexpress-dot-xpf-dot-scheduling-dot-schedulercontrol-dot-gettimeregions-x28-devexpress-dot-mvvm-dot-datetimerange-system-dot-boolean-x29.md

latest2.8 KB
Original Source

SchedulerControl.GetTimeRegions(DateTimeRange, Boolean) Method

Returns the collection of time regions for the specified time interval.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public IEnumerable<TimeRegionItem> GetTimeRegions(
    DateTimeRange interval,
    bool visibleResourcesOnly = true
)
vb
Public Function GetTimeRegions(
    interval As DateTimeRange,
    visibleResourcesOnly As Boolean = True
) As IEnumerable(Of TimeRegionItem)

Parameters

NameTypeDescription
intervalDateTimeRange

A DevExpress.Mvvm.DateTimeRange value that is the time interval for which to get time regions.

|

Optional Parameters

NameTypeDefaultDescription
visibleResourcesOnlyBooleanTrue

true, to return time regions available in the current view; otherwise, false.

|

Returns

TypeDescription
IEnumerable<TimeRegionItem>

A collection of DevExpress.Xpf.Scheduling.TimeRegionItem objects.

|

Remarks

If the visibleResourcesOnly parameter is set to false , the collection returned by the GetTimeRegions method includes time regions of the TimeRegionType.Pattern type that are not shown to the user.

The collection returned by the GetTimeRegions method does not include time regions of the TimeRegionType.Occurrence type. Time regions of this type are generated dynamically at runtime.

Time regions are created when the SchedulerControl is visually initialized. If you call the GetTimeRegions method before the initialization, it returns an empty collection.

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.Xpf.Scheduling Namespace