menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SchedulerTimeRegion - MAUI API Reference | Syncfusion

    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.EndTime
    SchedulerRegionBase.PropertyChanged
    SchedulerRegionBase.RecurrenceExceptionDates
    SchedulerRegionBase.RecurrenceRule
    SchedulerRegionBase.ResourceIds
    SchedulerRegionBase.StartTime
    Namespace: Syncfusion.Maui.Scheduler
    Assembly: Syncfusion.Maui.Scheduler.dll
    Syntax
    public class SchedulerTimeRegion : SchedulerRegionBase, INotifyPropertyChanged, IThemeElement

    Constructors

    SchedulerTimeRegion()

    Initializes a new instance of the SchedulerTimeRegion class.

    Declaration
    public SchedulerTimeRegion()

    Fields

    BackgroundProperty

    Identifies the Background dependency property.

    Declaration
    public static readonly BindableProperty BackgroundProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    Identifies the Background bindable property.

    TextStyleProperty

    Identifies the TextStyle dependency property.

    Declaration
    public static readonly BindableProperty TextStyleProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    Identifies the TextStyle bindable property.

    Properties

    Background

    Gets or sets the background color for the scheduler time region in the SfScheduler.

    Declaration
    public Brush Background { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.Brush

    EnablePointerInteraction

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

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

    Text

    Gets or sets the text for the scheduler time region.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    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
    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
    System.TimeZoneInfo

    Implements

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