MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SchedulerTimeRegion

    Show / Hide Table of Contents

    Class SchedulerTimeRegion

    Represents a class which is used to highlight time slots on day, week, workweek and timeline day, timeline week and timeline workweek based on start and end time and also used to restrict interaction on time slots.

    Inheritance
    System.Object
    SchedulerRegionBase
    SchedulerTimeRegion
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    SchedulerRegionBase.StartTime
    SchedulerRegionBase.EndTime
    SchedulerRegionBase.Background
    SchedulerRegionBase.RecurrenceRule
    SchedulerRegionBase.RecurrenceExceptionDates
    SchedulerRegionBase.ResourceIds
    SchedulerRegionBase.PropertyChanged
    Namespace: Syncfusion.Maui.Scheduler
    Assembly: Syncfusion.Maui.Scheduler.dll
    Syntax
    public class SchedulerTimeRegion : SchedulerRegionBase, INotifyPropertyChanged

    Constructors

    SchedulerTimeRegion()

    Initializes a new instance of the SchedulerTimeRegion class.

    Declaration
    public SchedulerTimeRegion()

    Properties

    EnablePointerInteraction

    Gets or sets a value indicating whether this SchedulerTimeRegion is enable pointer interaction.

    Declaration
    public bool EnablePointerInteraction { get; set; }
    Property Value
    Type Description
    System.Boolean

    Text

    Gets or sets the text for the scheduler time region.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    TextStyle

    Gets or sets the style of time region text, that used to customize the text color, font, font size, font family and font attributes.

    Declaration
    public SchedulerTextStyle TextStyle { get; set; }
    Property Value
    Type Description
    SchedulerTextStyle
    Remarks

    It is not applicable for the Month and TimelineMonth.

    Examples

    The below examples shows, how to use the TextStyle to the time region of the SfScheduler.

    this.Scheduler.DaysView.TimeRegions = this.GetTimeRegion();
    this.Scheduler.TimelineView.TimeRegions = this.GetTimeRegion();
    private ObservableCollection<SchedulerTimeRegion> GetTimeRegion()
    {
        var timeRegions = new ObservableCollection<SchedulerTimeRegion>();
        var timeRegionTextStyle = new SchedulerTextStyle()
        {
           TextColor = Colors.Blue,
           FontSize = 12,
        };
       var timeRegion = new SchedulerTimeRegion()
       {
          StartTime = DateTime.Today.Date.AddHours(13),
          EndTime = DateTime.Today.Date.AddHours(14),
          Text = "Lunch",
          EnablePointerInteraction = false,
          TextStyle = timeRegionTextStyle,
       };
        timeRegions.Add(timeRegion);
        return timeRegions;
    }

    TimeZone

    Gets or sets the time zone for the scheduler time region.

    Declaration
    public TimeZoneInfo TimeZone { get; set; }
    Property Value
    Type Description
    System.TimeZoneInfo

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved