WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SpecialTimeRegion

    Show / Hide Table of Contents

    Class SpecialTimeRegion

    Represents a class which is used to configure the properties in specific time region.

    Inheritance
    System.Object
    SpecialTimeRegion
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.UI.Xaml.Scheduler
    Assembly: Syncfusion.SfScheduler.WPF.dll
    Syntax
    public class SpecialTimeRegion

    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 Description
    System.Windows.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 Description
    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 false.

    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 Description
    System.DateTime

    Foreground

    Gets or sets the text foreground for Time region.

    Declaration
    public Brush Foreground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    RecurrenceExceptionDates

    Gets or sets the properties for maintaining recurrence rule exception Dates.

    Declaration
    public ObservableCollection<DateTime> RecurrenceExceptionDates { get; set; }
    Property Value
    Type Description
    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 Description
    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 Description
    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
    ResourceGroupType
    ResourceMapping

    StartTime

    Gets or sets the start hour for Time region.

    Declaration
    public DateTime StartTime { get; set; }
    Property Value
    Type Description
    System.DateTime

    Text

    Gets or sets the text for Time region.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved