Class SpecialTimeRegion
Represents a class which is used to configure the properties in specific time region.
Inheritance
Namespace: Syncfusion.UI.Xaml.Scheduler
Assembly: Syncfusion.Scheduler.WinUI.dll
Syntax
public class SpecialTimeRegion : Object
Constructors
SpecialTimeRegion()
Initializes a new instance of the SpecialTimeRegion class.
Declaration
public SpecialTimeRegion()
Properties
Background
Gets or sets the Background for Time region.
Declaration
public Brush Background { get; set; }
Property Value
Type |
---|
Microsoft.UI.Xaml.Media.Brush |
CanEdit
Gets or sets a value indicating whether to select time region or not.
Declaration
public bool CanEdit { get; set; }
Property Value
Type |
---|
System.Boolean |
CanMergeAdjacentRegions
Gets or sets a value indicating whether to merge adjacent special time regions and show as single region instead of showing for each day. For example, special time region with daily occurrence for an hour, will be merged together and shown as single time region in week, workweek views. if the same special time region repeats only in alternate days, then it won’t be merged.
Declaration
public bool CanMergeAdjacentRegions { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
Examples
#C#
The following code describes to combine special time region on time basis.
Schedule.DaysViewSettings.SpecialTimeRegions.Add(new SpecialTimeRegion
{
StartTime = new System.DateTime(2020, 12, 13, 13, 0, 0),
EndTime = new System.DateTime(2020, 12, 13, 14, 0, 0),
Text = "Lunch",
CanEdit = false,
Background = Brushes.Black,
Foreground = Brushes.White,
RecurrenceRule = "FREQ=DAILY;INTERVAL=1",
CanMergeAdjacentRegions =false,
ResourceIdCollection = new ObservableCollection<object>() { "0", "1", "2" }
});
EndTime
Gets or sets the end hour for Time region.
Declaration
public DateTime EndTime { get; set; }
Property Value
Type |
---|
System.DateTime |
Foreground
Gets or sets the text foreground for Time region.
Declaration
public Brush Foreground { get; set; }
Property Value
Type |
---|
Microsoft.UI.Xaml.Media.Brush |
RecurrenceExceptionDates
Gets or sets the properties for maintaining recurrence rule exception Dates.
Declaration
public ObservableCollection<DateTime> RecurrenceExceptionDates { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<System.DateTime> |
RecurrenceRule
Gets or sets a value indicating whether the special time region should be recursive.
Declaration
public string RecurrenceRule { get; set; }
Property Value
Type |
---|
System.String |
ResourceIdCollection
Gets or sets the Id’s of resources is used to group the SpecialTimeRegion based on resources Id.
Declaration
public ObservableCollection<object> ResourceIdCollection { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<System.Object> |
Remarks
Special region will not be added in time slot views, if resource ids are not added in SpecialTimeRegion when ResourceCollection added in scheduler.
See Also
StartTime
Gets or sets the start hour for Time region.
Declaration
public DateTime StartTime { get; set; }
Property Value
Type |
---|
System.DateTime |
Text
Gets or sets the text for Time region.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |