Back to Devexpress

TimeRegionItem.Type Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-timeregionitem-ade8a954.md

latest4.4 KB
Original Source

TimeRegionItem.Type Property

Gets or sets the type of the time region item.

Namespace : DevExpress.Xpf.Scheduling

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

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public TimeRegionType Type { get; set; }
vb
Public Property Type As TimeRegionType

Property Value

TypeDescription
TimeRegionType

A DevExpress.Xpf.Scheduling.TimeRegionType enumeration value.

|

Available values:

NameDescription
Normal

Represents a non-recurring time region.

| | Pattern |

Represents the time region which serves as the pattern for the other recurring time regions. The pattern for recurring time regions is specified via the TimeRegionItem.RecurrenceInfo property.

| | Occurrence |

Represents a regular recurring time region whose pattern is specified via the TimeRegionItem.RecurrenceInfo property.

| | ChangedOccurrence |

Represents a recurring time region, which was changed and now doesn’t satisfy the pattern of the recurring series.

| | DeletedOccurrence |

Represents a recurring time region which was deleted from the series of other recurring time regions of the same pattern.

|

Remarks

The type of the time region item is specified by its role (normal, recurring, modified in a recurring series (exception), etc.). All available types are listed in the TimeRegionType enumeration.

You can use the Type property to change a regular time region item in a recurring series into an exception. Use the RestoreOccurrence() method to restore an exception back to the regular occurrence.

Important

Do not change the time region item type arbitrarily. There are certain type changes which are not valid. Ensure that a time region item has all the information required for the new type, such as the correct TimeRegionItem.RecurrenceInfo value for the TimeRegionType.ChangedOccurrence appointment type.

The following table lists type conversions which are not valid and results in an exception:

BeforeAfter
NormalOccurrence
PatternOccurrence
OccurrencePattern

Other type conversions are valid, provided an appointment has the correct information in the required fields (TimeRegionItem.RecurrenceInfo and SchedulerItemBase.RecurrenceIndex for recurring series).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Type property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-filter-time-regions/CS/DXSample/MainWindow.xaml#L47

xml
RecurrenceInfo="{dxsch:RecurrenceDaily Start='1/1/2019 13:00:00', ByDay=WorkDays}"
                      Type ="Pattern" />
<dxsch:TimeRegionItem BrushName="{x:Static dxsch:DefaultBrushNames.TimeRegion1Dotted}"

See Also

TimeRegionItem Class

TimeRegionItem Members

DevExpress.Xpf.Scheduling Namespace