menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfScheduler - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfScheduler

    Represents the control which allows the user to create and manage appointments.

    Inheritance
    System.Object
    SfScheduler
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Scheduler
    Assembly: Syncfusion.SfScheduler.WPF.dll
    Syntax
    public class SfScheduler : Control, IDisposable
    Examples

    Below example shows, how to bind ItemsSource and populate appointments with resources in Scheduler control.

    # [Model.cs](#tab/tabid-1)
    public class SchedulerModel : NotificationObject
    {
        private DateTime from, to;
        private string eventName;
        private bool isAllDay;
        private string startTimeZone, endTimeZone;
        private Brush color;
        private ObservableCollection<DateTime> recurrenceExceptionDates = new ObservableCollection<DateTime>();
        private string rRUle;
        private object recurrenceId;
        private object id;
        private ObservableCollection<object> resources;
        private string notes;
        public DateTime From
        {
            get { return from; }
            set
            {
                from = value;
                RaisePropertyChanged("From");
            }
        }
        public DateTime To
        {
            get { return to; }
            set
            {
                to = value;
                RaisePropertyChanged("To");
            }
        }
        public bool IsAllDay
        {
            get { return isAllDay; }
            set
            {
                isAllDay = value;
                RaisePropertyChanged("IsAllDay");
            }
        }
        public string EventName
        {
            get { return eventName; }
            set
            {
                eventName = value;
                RaisePropertyChanged("EventName");
            }
        }
        public string Notes
        {
            get { return notes; }
            set
            {
                notes = value;
                RaisePropertyChanged("Notes");
            }
        }
        public string StartTimeZone
        {
            get { return startTimeZone; }
            set
            {
                startTimeZone = value;
                RaisePropertyChanged("StartTimeZone");
            }
        }
        public string EndTimeZone
        {
            get { return endTimeZone; }
            set
            {
                endTimeZone = value;
                RaisePropertyChanged("EndTimeZone");
            }
        }
        public Brush Color
        {
            get { return color; }
            set
            {
                color = value;
                RaisePropertyChanged("Color");
            }
        }
        public object RecurrenceId
        {
            get { return recurrenceId; }
            set
            {
                recurrenceId = value;
                RaisePropertyChanged("RecurrenceId");
            }
        }
        public object Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged("Id");
            }
        }
        public string RecurrenceRule
        {
            get { return rRUle; }
            set
            {
                rRUle = value;
                RaisePropertyChanged("RecurrenceRule");
            }
        }
        public ObservableCollection<DateTime> RecurrenceExceptions
        {
            get { return recurrenceExceptionDates; }
            set
            {
                recurrenceExceptionDates = value;
                RaisePropertyChanged("RecurrenceExceptions");
            }
        }
        public ObservableCollection<object> Resources
        {
            get { return resources; }
            set
            {
                resources = value;
                this.RaisePropertyChanged("Resources");
            }
        }
    }
    public class Employee
    {
        public string Name { get; set; }
        public object ID { get; set; }
        public Brush BackgroundBrush { get; set; }
        public Brush ForegroundBrush { get; set; }
    }
    # [ViewModel.cs](#tab/tabid-2)
    public class SchedulerViewModel : NotificationObject
    {
        private List<string> currentDayMeetings;
        private List<Brush> colorCollection;
        private ObservableCollection<object> resources;
        private List<string> nameCollection;
        public BindingViewModel()
        {
            this.InitializeDataForBookings();
            this.InitializeResources();
            this.BookingResourceAppointments();
        }
        public ObservableCollection<SchedulerModel> ResourceAppointments { get; set; }
        public ObservableCollection<object> Resources
        {
            get { return resources; }
            set
            {
                resources = value;
                this.RaisePropertyChanged("Resources");
            }
        }
        private void InitializeResources()
        {
            Random random = new Random();
            this.Resources = new ObservableCollection<object>();
            this.nameCollection = new List<string>();
            this.nameCollection.Add("Sophia");
            this.nameCollection.Add("Kinsley Elena");
            this.nameCollection.Add("Adeline Ruby");
            this.nameCollection.Add("Kinsley Ruby");
            this.nameCollection.Add("Emilia");
            this.nameCollection.Add("Daniel");
            this.nameCollection.Add("Adeline Elena");
            this.nameCollection.Add("Emilia William");
            this.nameCollection.Add("James William");
            this.nameCollection.Add("Zoey Addison");
            this.nameCollection.Add("Danial William");
            this.nameCollection.Add("Stephen Addison");
            this.nameCollection.Add("Stephen");
            this.nameCollection.Add("Danial Addison");
            this.nameCollection.Add("Brooklyn");
            for (int i = 0; i < 7; i++)
            {
                Employee employee = new Employee();
                employee.Name = nameCollection[i];
                employee.BackgroundBrush = this.colorCollection[random.Next(8)];
                employee.ID = i.ToString();
                Resources.Add(employee);
            }
        }
        private void BookingResourceAppointments()
        {
            Random randomTime = new Random();
            List<Point> randomTimeCollection = this.GettingTimeRanges();
            ResourceAppointments = new ObservableCollection<SchedulerModel>();
            DateTime date;
            DateTime dateFrom = DateTime.Now.AddDays(-80);
            DateTime dateTo = DateTime.Now.AddDays(80);
            DateTime dateRangeStart = DateTime.Now.AddDays(-70);
            DateTime dateRangeEnd = DateTime.Now.AddDays(70);
            for (date = dateFrom; date < dateTo; date = date.AddDays(1))
            {
                if ((DateTime.Compare(date, dateRangeStart) > 0) && (DateTime.Compare(date, dateRangeEnd) < 0))
                {
                    for (int additionalAppointmentIndex = 0; additionalAppointmentIndex < 8; additionalAppointmentIndex++)
                    {
                        SchedulerModel meeting = new SchedulerModel();
                        meeting.From = new DateTime(date.Year, date.Month, date.Day, randomTime.Next(0, 23), 0, 0);
                        meeting.To = meeting.From.AddHours(randomTime.Next(1, 3));
                        meeting.EventName = this.currentDayMeetings[randomTime.Next(9)];
                        meeting.Color = this.colorCollection[randomTime.Next(8)];
                        meeting.IsAllDay = false;
                        var coll = new ObservableCollection<object>
                            {
                                (resources[randomTime.Next(Resources.Count)] as Employee).ID
                            };
                        meeting.Resources = coll;
                        this.ResourceAppointments.Add(meeting);
                    }
                }
                else
                {
                    SchedulerModel meeting = new SchedulerModel();
                    meeting.From = new DateTime(date.Year, date.Month, date.Day, randomTime.Next(0, 23), 0, 0);
                    meeting.To = meeting.From.AddDays(2).AddHours(1);
                    meeting.EventName = this.currentDayMeetings[randomTime.Next(9)];
                    meeting.Color = this.colorCollection[randomTime.Next(8)];
                    meeting.IsAllDay = true;
                    var coll = new ObservableCollection<object>
                            {
                                (resources[randomTime.Next(Resources.Count)] as Employee).ID
                            };
                    meeting.Resources = coll;
                    this.ResourceAppointments.Add(meeting);
                }
            }
        }
        private List<Point> GettingTimeRanges()
        {
            List<Point> randomTimeCollection = new List<Point>();
            randomTimeCollection.Add(new Point(9, 11));
            randomTimeCollection.Add(new Point(12, 14));
            randomTimeCollection.Add(new Point(15, 17));
            return randomTimeCollection;
        }
        private void InitializeDataForBookings()
        {
            this.currentDayMeetings = new List<string>();
            this.currentDayMeetings.Add("General Meeting");
            this.currentDayMeetings.Add("Plan Execution");
            this.currentDayMeetings.Add("Project Plan");
            this.currentDayMeetings.Add("Consulting");
            this.currentDayMeetings.Add("Performance Check");
            this.currentDayMeetings.Add("Yoga Therapy");
            this.currentDayMeetings.Add("Plan Execution");
            this.currentDayMeetings.Add("Project Plan");
            this.currentDayMeetings.Add("Consulting");
            this.currentDayMeetings.Add("Performance Check");
            this.colorCollection = new List<Brush>();
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF339933")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF00ABA9")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFE671B8")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF1BA1E2")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFD80073")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFA2C139")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFA2C139")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFD80073")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF339933")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFE671B8")));
            this.colorCollection.Add(new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF00ABA9")));
        }
    }
    # [MainWindow](#tab/tabid-3)
    <syncfusion:SfScheduler ViewType = "Week"
                                    ResourceGroupType="Resource"
                                    ResourceCollection="{Binding Resources}"
                                    ItemsSource="{Binding ResourceAppointments}">
        <syncfusion:SfScheduler.ResourceMapping>
            <syncfusion:ResourceMapping
                        Id = "ID"
                        Name="Name"
                        Background="BackgroundBrush"
                        Foreground="ForegroundBrush"/>
        </syncfusion:SfScheduler.ResourceMapping>
        <syncfusion:SfScheduler.AppointmentMapping>
            <syncfusion:AppointmentMapping
                        Subject = "EventName"
                        StartTime="From"
                        EndTime="To"
                        AppointmentBackground="Color"
                        ResourceIdCollection ="Resources"
                        IsAllDay="IsAllDay"
                        RecurrenceExceptionDates="RecurrenceExceptions"
                    RecurrenceRule="RecurrenceRule"
                    RecurrenceId="RecurrenceId"/>
        </syncfusion:SfScheduler.AppointmentMapping>
    </syncfusion:SfScheduler>

    Constructors

    SfScheduler()

    Initializes a new instance of the SfScheduler class.

    Declaration
    public SfScheduler()

    Fields

    AllowedViewTypesProperty

    Identifies the AllowedViewTypes dependency property.

    Declaration
    public static readonly DependencyProperty AllowedViewTypesProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for AllowedViewTypes dependency property.

    AppointmentContextMenuProperty

    Identifies the AppointmentContextMenu dependency property.

    Declaration
    public static readonly DependencyProperty AppointmentContextMenuProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the AppointmentContextMenu dependency property.

    AppointmentEditFlagProperty

    Identifies the AppointmentEditFlag dependency property.

    Declaration
    public static readonly DependencyProperty AppointmentEditFlagProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for AppointmentEditFlag dependency property.

    AppointmentMappingProperty

    Identifies the AppointmentMapping dependency property.

    Declaration
    public static readonly DependencyProperty AppointmentMappingProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for AppointmentMapping dependency property.

    AppointmentTemplateSelectorProperty

    Identifies the Syncfusion.UI.Xaml.Scheduler.SfScheduler.AppointmentTemplateSelector dependency property.

    Declaration
    public static readonly DependencyProperty AppointmentTemplateSelectorProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the Syncfusion.UI.Xaml.Scheduler.SfScheduler.AppointmentTemplateSelector dependency property.

    BlackoutDatesProperty

    Identifies the BlackoutDates dependency property.

    Declaration
    public static readonly DependencyProperty BlackoutDatesProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for BlackoutDates dependency property.

    CalendarIdentifierProperty

    Identifies the CalendarIdentifier dependency property.

    Declaration
    public static readonly DependencyProperty CalendarIdentifierProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for CalendarIdentifier dependency property.

    CellContextMenuProperty

    Identifies the CellContextMenu dependency property.

    Declaration
    public static readonly DependencyProperty CellContextMenuProperty
    Field Value
    Type
    System.Windows.DependencyProperty
    Remarks

    The identifier for the CellContextMenu dependency property.

    DaysViewSettingsProperty

    Identifies the DaysViewSettings dependency property.

    Declaration
    public static readonly DependencyProperty DaysViewSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for DaysViewSettings dependency property.

    DisplayDateProperty

    Identifies the DisplayDate dependency property.

    Declaration
    public static readonly DependencyProperty DisplayDateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for DisplayDate dependency property.

    DragDropSettingsProperty

    Identifies the DragDropSettings dependency property.

    Declaration
    public static readonly DependencyProperty DragDropSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for DragDropSettings dependency property.

    EnableReminderProperty

    Identifies the EnableReminder dependency property.

    Declaration
    public static readonly DependencyProperty EnableReminderProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for EnableReminder dependency property.

    EnableToolTipProperty

    Identifies the EnableToolTip dependency property.

    Declaration
    public static readonly DependencyProperty EnableToolTipProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for EnableToolTip dependency property.

    FirstDayOfWeekProperty

    Identifies the FirstDayOfWeek dependency property.

    Declaration
    public static readonly DependencyProperty FirstDayOfWeekProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for FirstDayOfWeek dependency property.

    HeaderDateFormatProperty

    Identifies the HeaderDateFormat dependency property.

    Declaration
    public static readonly DependencyProperty HeaderDateFormatProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for HeaderDateFormat dependency property.

    HeaderHeightProperty

    Identifies the HeaderHeight dependency property.

    Declaration
    public static readonly DependencyProperty HeaderHeightProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for HeaderHeight dependency property.

    HeaderTemplateProperty

    Identifies the HeaderTemplate dependency property.

    Declaration
    public static readonly DependencyProperty HeaderTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for HeaderTemplate dependency property.

    ItemsSourceProperty

    Identifies the ItemsSource dependency property.

    Declaration
    public static readonly DependencyProperty ItemsSourceProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ItemsSource dependency property.

    LoadOnDemandCommandProperty

    Identifies the LoadOnDemandCommand dependency property.

    Declaration
    public static readonly DependencyProperty LoadOnDemandCommandProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for LoadOnDemandCommand dependency property.

    MaximumDateProperty

    Identifies the MaximumDate dependency property.

    Declaration
    public static readonly DependencyProperty MaximumDateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for MaximumDate dependency property.

    MinimumDateProperty

    Identifies the MinimumDate dependency property.

    Declaration
    public static readonly DependencyProperty MinimumDateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for MinimumDate dependency property.

    MonthViewSettingsProperty

    Identifies the MonthViewSettings dependency property.

    Declaration
    public static readonly DependencyProperty MonthViewSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for MonthViewSettings dependency property.

    ResourceCollectionProperty

    Identifies the ResourceCollection dependency property.

    Declaration
    public static readonly DependencyProperty ResourceCollectionProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ResourceCollection dependency property.

    ResourceGroupTypeProperty

    Identifies the ResourceGroupType dependency property.

    Declaration
    public static readonly DependencyProperty ResourceGroupTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ResourceGroupType dependency property.

    ResourceHeaderTemplateProperty

    Identifies the ResourceHeaderTemplate dependency property.

    Declaration
    public static readonly DependencyProperty ResourceHeaderTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ResourceHeaderTemplate dependency property.

    ResourceHeaderTemplateSelectorProperty

    Identifies the ResourceHeaderTemplateSelector dependency property.

    Declaration
    public static readonly DependencyProperty ResourceHeaderTemplateSelectorProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ResourceHeaderTemplateSelector dependency property.

    ResourceMappingProperty

    Identifies the ResourceMapping dependency property.

    Declaration
    public static readonly DependencyProperty ResourceMappingProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ResourceMapping dependency property.

    SelectedDateProperty

    Identifies the SelectedDate dependency property.

    Declaration
    public static readonly DependencyProperty SelectedDateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for SelectedDate dependency property.

    ShowBusyIndicatorProperty

    Identifies the ShowBusyIndicator dependency property.

    Declaration
    public static readonly DependencyProperty ShowBusyIndicatorProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ShowBusyIndicator dependency property.

    ShowDatePickerButtonProperty

    Identifies the ShowDatePickerButton dependency property.

    Declaration
    public static readonly DependencyProperty ShowDatePickerButtonProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ShowDatePickerButton dependency property.

    TimelineViewSettingsProperty

    Identifies the TimelineViewSettings dependency property.

    Declaration
    public static readonly DependencyProperty TimelineViewSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for TimelineViewSettings dependency property.

    TimeZoneProperty

    Identifies the TimeZone dependency property.

    Declaration
    public static readonly DependencyProperty TimeZoneProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for TimeZone dependency property.

    ToolTipTemplateProperty

    Identifies the ToolTipTemplate dependency property.

    Declaration
    public static readonly DependencyProperty ToolTipTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ToolTipTemplate dependency property.

    ViewTypeProperty

    Identifies the ViewType dependency property.

    Declaration
    public static readonly DependencyProperty ViewTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for ViewType dependency property.

    Properties

    AllowedViewTypes

    Gets or sets the AllowedSchedulerViewTypes that will be displayed on the SfScheduler header for quick navigation.

    Declaration
    public AllowedSchedulerViewTypes AllowedViewTypes { get; set; }
    Property Value
    Type Description
    AllowedSchedulerViewTypes

    The default value is None

    Remarks

    The ViewType will be restricted based on the AllowedViewTypes. For example, the AllowedViewTypes given as Day, Week, WorkWeek, and if the ViewType given as Month, this will be reset to AllowedViewTypes first value. If AllowedViewTypes is None then the scheduler allows view navigation for all the scheduler views by using the keyboard keys https://help.syncfusion.com/wpf/scheduler/accessibility#keyboard-navigation. If AllowedViewTypes is given, then the keyboard keys https://help.syncfusion.com/wpf/scheduler/accessibility#keyboard-navigation will be restricted to the given allowed view types.

    Examples

    #Xaml

    <syncfusion:SfScheduler x:Name="Schedule"
    AllowedViewTypes="Month,Day,Week" >
    </syncfusion:SfScheduler>

    #C#

    this.Schedule.AllowedViewTypes =  AllowedSchedulerViewTypes.TimelineMonth | AllowedSchedulerViewTypes.Week | AllowedSchedulerViewTypes.WorkWeek | AllowedSchedulerViewTypes.TimelineDay | (AllowedSchedulerViewTypes.TimelineWeek & ~AllowedSchedulerViewTypes.Day) ;

    AllowViewNavigation

    Gets or sets a value indicating whether the current view should navigate to the respective day or timeline day view on clicking a month cell or a date in the view header of the following views: week, work week, month agenda, timeline week, timeline work week and timeline month views.

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

    The default value is false.

    Remarks

    AllowViewNavigation is not applicable in day and timeline day views and if ShowAgendaView is true in month view, the month view should navigate to the day view by single tapping on the agenda date view header, otherwise the month view should navigate to the day view by single tapping on the month cell.

    AppointmentContextMenu

    Gets or sets the context menu that should appear whenever the context menu is requested through user interface (UI) from within appointment element.

    Declaration
    public ContextMenu AppointmentContextMenu { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.ContextMenu

    The default value is null.

    Remarks

    AppointmentContextMenu opens when right click over appointment in any views. In month view, AppointmentContextMenu opens when AppointmentDisplayMode is Appointment. The DataContext for the context menu is SchedulerContextMenuInfo .

    Examples

    #Xaml

    This sample shows how to bind the commands in SchedulerCommands to menu item. Command parameter of menu item should bound to context menu's data context when using the commands in SchedulerCommands.

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule">
       <syncfusion:SfScheduler.AppointmentContextMenu>
           <ContextMenu>
               <MenuItem Command="{Binding Source={x:Static Member=syncfusion:SchedulerCommands.Edit}}"
                                 CommandParameter="{Binding}"
                                 CommandTarget="{Binding ElementName=schedule}"
                                 Header="Edit"/>
           </ContextMenu>
       </syncfusion:SfScheduler.AppointmentContextMenu>
    </syncfusion:SfScheduler>
    *** #[Xaml](#tab/tabid-7)

    Below example shows how to bind the command in the data context of SfScheduler. The SchedulerContextMenuInfo is the DataContext for AppointmentContextMenu, So you can bind the command in data context of scheduler by using Scheduler as below.

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule">
       <syncfusion:SfScheduler.AppointmentContextMenu>
           <ContextMenu>
               <MenuItem Command="{Binding Path=Scheduler.DataContext.MenuCommand}"
                                 Header="Header"/>
           </ContextMenu>
       </syncfusion:SfScheduler.AppointmentContextMenu>
    </syncfusion:SfScheduler>
    In above examples, SchedulerContextMenuInfo is passed as command parameter.
    See Also
    CellContextMenu
    SchedulerCommands
    SchedulerContextMenuOpening

    AppointmentEditFlag

    Gets or sets a value indicating appointment operation to be handle.

    Declaration
    public AppointmentEditFlag AppointmentEditFlag { get; set; }
    Property Value
    Type
    AppointmentEditFlag
    Examples

    #C#

    this.Schedule.AppointmentEditFlag = AppointmentEditFlag.Add | AppointmentEditFlag.Resize;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       AppointmentEditFlag="Add,DragDrop"">
    </syncfusion:SfScheduler>

    AppointmentMapping

    Gets or sets the custom object configuration mapping information to ScheduleAppointment.

    Declaration
    public AppointmentMapping AppointmentMapping { get; set; }
    Property Value
    Type
    AppointmentMapping
    Remarks

    The custom appointment class should contain event StartTime and EndTime fields as mandatory.

    Examples

    The following code snippets used to configure the custom appointment.

    #[Model](#tab/tabid-51)
    public class Meeting
    {
       public string EventName { get; set; }
       public DateTime From { get; set; }
       public DateTime To { get; set; }
       public Brush BackgroundColor { get; set; }
       public Brush ForegroundColor { get; set; }
    }
    #[Xaml](#tab/tabid-52)
    <syncfusion:SfScheduler x:Name="Schedule"
                            ViewType="Week"
                            ItemsSource="{Binding Meetings}">
        <syncfusion:SfScheduler.AppointmentMapping>
            <syncfusion:AppointmentMapping
                    Subject = "EventName"
                    StartTime="From"
                    EndTime="To"
                    AppointmentBackground="BackgroundColor"
                    Foreground="ForegroundColor"/>
        </syncfusion:SfScheduler.AppointmentMapping>
    </syncfusion:SfScheduler>
    #[C#](#tab/tabid-53)
    AppointmentMapping dataMapping = new AppointmentMapping();
    dataMapping.Subject = "EventName";
    dataMapping.StartTime = "From";
    dataMapping.EndTime = "To";
    dataMapping.AppointmentBackground = "BackgroundColor";
    dataMapping.Foreground = "ForegroundColor";
    Schedule.AppointmentMapping = dataMapping;
    See Also
    ScheduleAppointment
    ReminderMapping
    ScheduleAppointmentCollection

    AppointmentResizeController

    Gets or sets an instance of AppointmentResizeController which controls the appointment resizing operation in SfSchedule.

    Declaration
    public AppointmentResizeController AppointmentResizeController { get; set; }
    Property Value
    Type
    AppointmentResizeController

    BlackoutDates

    Gets or sets the blackout dates for predefined events which is used to restrict user interaction with the specific dates in Month and TimelineMonth views.

    Declaration
    public ObservableCollection<DateTime> BlackoutDates { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.DateTime>
    Remarks

    BlackoutDates will be applicable to Month and TimelineMonth views only.

    Examples

    The following sample used to set the blackout dates to the scheduler Month and TimelineMonth views.

    #[C#](#tab/tabid-33)
    SfScheduler scheduler = new SfScheduler();
    scheduler.ViewType = SchedulerViewType.Month;
    scheduler.BlackoutDates = new ObservableCollection<DateTime>()
     {
        DateTime.Now.Date.AddDays(2),
        DateTime.Now.Date.AddDays(4),
        DateTime.Now.Date.AddDays(6),
        DateTime.Now.Date.AddDays(5)
     };

    CalendarIdentifier

    Gets or sets the calendar system to use.

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

    The default value is GregorianCalendar.

    Remarks

    FlowDirection will be updated based on the CalendarIdentifier and if you want to override this behavior set FlowDirection after CalendarIdentifier.

    All calendar types are supported except JapaneseCalendar, JulianCalendar and Lunar type calendars https://docs.microsoft.com/en-us/dotnet/standard/datetime/working-with-calendars.

    Examples

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Scheduler"
    CalendarIdentifier="HebrewCalendar" >
    </syncfusion:SfScheduler>

    #C#

    this.Scheduler.CalendarIdentifier = "HebrewCalendar";
    this.Scheduler.DisplayDate = new DateTime(2021, 8, 3, 9, 0, 0, 0);
    this.Scheduler.SelectedDate = new DateTime(1442, 8, 3, 9, 0, 0, 0, new HebrewCalendar());

    CellContextMenu

    Gets or sets the context menu that should appear whenever the context menu is requested through user interface (UI) from within timeslot cell, month cell and all-day panel.

    Declaration
    public ContextMenu CellContextMenu { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.ContextMenu

    The default value is null.

    Remarks

    The DataContext for the context menu is SchedulerContextMenuInfo .

    Examples

    #Xaml

    This sample shows how to bind the commands in SchedulerCommands to menu item. Command parameter of menu item should bound to context menu's data context when using the commands in SchedulerCommands.

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule">
       <syncfusion:SfScheduler.CellContextMenu>
           <ContextMenu>
               <MenuItem Command="{Binding Source={x:Static Member=syncfusion:SchedulerCommands.Add}}"
                                 CommandParameter="{Binding}"
                                 CommandTarget="{Binding ElementName=schedule}"
                                 Header="Add"/>
           </ContextMenu>
       </syncfusion:SfScheduler.CellContextMenu>
    </syncfusion:SfScheduler>
    *** #[Xaml](#tab/tabid-9)

    Below example shows how to bind the command in the data context of SfScheduler. The SchedulerContextMenuInfo is the DataContext for AppointmentContextMenu, So you can bind the command in data context of scheduler by using Scheduler as below.

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule">
       <syncfusion:SfScheduler.CellContextMenu>
           <ContextMenu>
               <MenuItem Command="{Binding Path=Scheduler.DataContext.MenuCommand}"
                                 Header="Header"/>
           </ContextMenu>
       </syncfusion:SfScheduler.CellContextMenu>
    </syncfusion:SfScheduler>
    In above examples, SchedulerContextMenuInfo is passed as command parameter.
    See Also
    AppointmentContextMenu
    SchedulerCommands
    SchedulerContextMenuOpening

    DaysViewSettings

    Gets or sets properties which allows to customize the day, week and work week view of the SfScheduler.

    Declaration
    public DaysViewSettings DaysViewSettings { get; set; }
    Property Value
    Type Description
    DaysViewSettings

    The properties settings used to customize the day, week and work week view.

    Examples

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
    ViewType="Day" >
    <syncfusion:SfScheduler.DayViewSettings>
    <syncfusion:DaysViewSettings  TimeIntervalHeight="120"
                                  StartHour="8"
                                  EndHour="15"
                                  TimeRulerSize="100"
                                  ViewHeaderDayFormat="dddd"
                                  ViewHeaderDateFormat="dd"
                                  ViewHeaderHeight="100"
                                  />
    </ syncfusion:SfScheduler.DaysViewSettings>
    </syncfusion:SfScheduler>

    #C#

    this.Schedule.ViewType = SchedulerViewType.Day;
    this.Schedule.DaysViewSettings.TimeIntervalHeight = "120";
    this.Schedule.DaysViewSettings.StartHour="8";
    this.Schedule.DaysViewSettings.EndHour="15";
    this.Schedule.DaysViewSettings.TimeRulerSize="100";
    this.Schedule.DaysViewSettings.ViewHeaderDayFormat = "dddd";
    this.Schedule.DaysViewSettings.ViewHeaderDateFormat = "dd";
    this.Schedule.DaysViewSettings.ViewHeaderHeight = 100;
    See Also
    DaysViewSettings
    Day
    Week
    WorkWeek

    DisplayDate

    Gets or sets the display date to programmatically navigate the dates in SfScheduler.

    Declaration
    public DateTime DisplayDate { get; set; }
    Property Value
    Type
    System.DateTime
    Remarks

    Date navigation before the MinimumDate will be reset to the scheduler minimum date and date navigation beyond the MaximumDate will be rest to the scheduler maximum date.

    Examples

    The code below sets the DisplayDate to Scheduler

    #[C#](#tab/tabid-24)
    this.Schedule.DisplayDate = new DateTime(2020, 07, 05, 10, 0, 0);
    #[Xaml](#tab/tabid-25)
    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       DisplayDate="2020-07-05 10:0:0">
    </syncfusion:SfScheduler>
    See Also
    MinimumDate
    MaximumDate
    Forward()
    Backward()
    SelectedDate

    DragDropSettings

    Gets or sets the drag and drop settings to customize the appointment position, dragging indicator style, navigation and time indicator format.

    Declaration
    public DragDropSettings DragDropSettings { get; set; }
    Property Value
    Type
    DragDropSettings
    Examples

    The following sample used to configure the Scheduler drag and drop settings.

    #[Xaml](#tab/tabid-40)
    <syncfusion:SfScheduler x:Name="Schedule" ViewType="TimelineDay">
      <syncfusion:SfScheduler.DragDropSettings>
           <syncfusion:DragDropSettings ShowTimeIndicator = "True"
                                        AllowNavigate="True"
                                        AllowScroll="True"
                                        TimeIndicatorFormat="dd hh:mm" />
       </syncfusion:SfScheduler.DragDropSettings>
    </syncfusion:SfScheduler>
    #[C#](#tab/tabid-41)
     this.Schedule.DragDropSettings.AllowNavigate = true;
     this.Schedule.DragDropSettings.AllowScroll = true;
     this.Schedule.DragDropSettings.ShowTimeIndicator = true;
     this.Schedule.DragDropSettings.AutoNavigationDelay = new TimeSpan(0, 0, 0, 0, 1000);
     this.Schedule.DragDropSettings.TimeIndicatorFormat = "dd hh:tt";
    See Also
    AppointmentEditFlag
    DragDrop
    AppointmentDragOver
    AppointmentDragStarting
    AppointmentDropping

    EnableReminder

    Gets or sets a value indicating whether to enable reminder alerts to the Reminders.

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

    The default value is true.

    Remarks

    EnableReminder should be true to show reminder alerts. The reminder alerts are displayed based on Reminders. An appointment can have one or more reminders.

    Examples

    This sample shows how to create reminders for an appointment and enable reminder alerts in SfScheduler.

    #[C#](#tab/tabid-26)
    var scheduler = new SfScheduler();
    scheduler.EnableReminder = true;
    ScheduleAppointmentCollection appointments = new ScheduleAppointmentCollection();
    ScheduleAppointment reminderAppointment = new ScheduleAppointment() { Subject = "Reminder", StartTime = DateTime.Now.Date.AddHours(9), EndTime = DateTime.Now.Date.AddHours(11) };
    SchedulerReminder reminder1 = new SchedulerReminder() { ReminderTimeInterval = new TimeSpan(12, 0, 0) };
    SchedulerReminder reminder2 = new SchedulerReminder() { ReminderTimeInterval = new TimeSpan(6, 0, 0) };
    reminderAppointment.Reminders.Add(reminder1);
    reminderAppointment.Reminders.Add(reminder2);
    appointments.Add(reminderAppointment);
    scheduler.ItemsSource = appointments;
    See Also
    Reminders
    ReminderMapping

    EnableToolTip

    Gets or sets a value indicating whether the tooltip should be displayed when the mouse hovered on the appointment in the SfScheduler.

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

    The default value is false.

    Remarks

    This property determines whether tool tips are shown when users interact with appointments in the SfScheduler. The tool tips typically provide additional information about the appointment being interacted with, such as its appointment value.

    Examples

    #C#

    this.Schedule.EnableToolTip = true;

    #Xaml

    <syncfusion:SfScheduler x:Name="Schedule"
                            EnableToolTip="True">
    </syncfusion:SfScheduler>
    See Also
    ToolTipTemplate

    FirstDayOfWeek

    Gets or sets the day to modify the default first day of week for schedule.

    Declaration
    public DayOfWeek FirstDayOfWeek { get; set; }
    Property Value
    Type
    System.DayOfWeek
    Remarks

    This property will be applicable to Week, WorkWeek, TimelineWeek, TimelineWorkWeek and Month views only.

    Examples

    #C#

    this.Schedule.FirstDayOfWeek = DayOfWeek.Monday;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       FirstDayOfWeek="Monday">
    </syncfusion:SfScheduler>

    HeaderDateFormat

    Gets or sets a header date format of SfScheduler. The default header format is MMMM yyyy.

    Declaration
    public string HeaderDateFormat { get; set; }
    Property Value
    Type
    System.String
    Examples

    #C#

    this.Schedule.HeaderDateFormat = "MMM/yyyy";

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       HeaderDateFormat="MMM/yyyy">
    </syncfusion:SfScheduler>

    HeaderHeight

    Gets or sets a value to customize the header height of the scheduler.

    Declaration
    public double HeaderHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 50.

    Examples

    #C#

    this.Schedule.HeaderHeight = 100;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       HeaderHeight="100" >
    </syncfusion:SfScheduler>

    HeaderTemplate

    Gets or sets the data template to customize the appearance of the SfScheduler header.

    Declaration
    public DataTemplate HeaderTemplate { get; set; }
    Property Value
    Type
    System.Windows.DataTemplate
    Examples

    The code below sets the HeaderTemplate to Scheduler

    #[Xaml](#tab/tabid-54)
    <syncfusion:SfScheduler x:Name="Schedule">
        <syncfusion:SfScheduler.HeaderTemplate>
            <DataTemplate >
                <TextBlock FontStyle = "Italic"
                           Foreground="Blue"
                           FontSize="25"
                           Text="{Binding}"/>
            </DataTemplate>
        </syncfusion:SfScheduler.HeaderTemplate>
    </syncfusion:SfScheduler>

    ItemsSource

    Gets or sets the value which used to set the appointment collection to the scheduler.

    Declaration
    public IEnumerable ItemsSource { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable
    Remarks

    ItemsSource can take System.Collections.IEnumerable collection of both ScheduleAppointment or custom class. When custom class collection is provided, it is necessary to map the custom class with schedule using AppointmentMapping.

    See Also
    ScheduleAppointment
    ScheduleAppointmentCollection
    AppointmentMapping

    LoadOnDemandCommand

    Gets or sets the System.Windows.Input.ICommand to invoke after the visible date range changed or ViewType changed or ResourceCollection changed to load the ItemsSource for the visible date range.

    Declaration
    public ICommand LoadOnDemandCommand { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    The default value is null.

    Remarks

    The QueryAppointmentsEventArgs passed as command parameter. LoadOnDemandCommandis used to load the appointments in on-demand for visible date range. Loading appointments in on-demand improves the loading performance when you have appointments ranging for multiple years. Once the ViewChanged event is raised, LoadOnDemandCommand will be invoked. If an appointment has been added, deleted or updated within the visible date range, then the LoadOnDemandCommand will not be invoked. Since appointments were already loaded for that visible date range. When the ResourceCollection is updated, the LoadOnDemandCommand will be invoked. When the ResourceGroupType is changed, the LoadOnDemandCommand will be invoked. The recurrence appointment should be added to the ItemsSource until the date of recurrence ends. If RecurrenceRule added with count or end date, you can use the method to get recurrence date collection and compare recursive dates in the current visible date range then add recurrence appointment in ItemsSource if recursive dates in current visible date range. If RecurrenceRule added with no end date , then recurrence appointment should be added in the ItemsSource when all visible date changed from the recurrence start date.

    Examples

    The following example describes to load appointments on demand using command.

    #[MainWindow](#tab/tabid-a)
    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="scheduler"
                            LoadOnDemandCommand="{Binding LoadOnDemandCommand}"
                            ItemsSource="{Binding Events}"
                            ShowBusyIndicator="{Binding ShowBusyIndicator}">
        <syncfusion:SfScheduler.DataContext>
            <local:SchedulerViewModel/>
        </syncfusion:SfScheduler.DataContext>
    </syncfusion:SfScheduler>
    # [ViewModel.cs](#tab/tabid-b)
    public class SchedulerViewModel : NotificationObject
    {
        private IEnumerable events;
        private bool showBusyIndicator;
        public ICommand LoadOnDemandCommand { get; set; }
    
    public IEnumerable Events
    {
        get { return events; }
        set
        {
            events = value;
            this.RaisePropertyChanged(&quot;Events&quot;);
        }
    }
    
    public bool ShowBusyIndicator
    {
        get { return showBusyIndicator; }
        set
        {
            showBusyIndicator = value;
            this.RaisePropertyChanged(&quot;ShowBusyIndicator&quot;);
        }
    }
    
    public SchedulerViewModel()
    {
        this.LoadOnDemandCommand = new DelegateCommand(ExecuteOnDemandLoading, CanExecuteOnDemandLoading);
    }
    
    public async void ExecuteOnDemandLoading(object parameter)
    {
        this.ShowBusyIndicator = true;
        await Application.Current.MainWindow.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() =>
        {
            this.Events = this.GetAppointments((parameter as QueryAppointmentsEventArgs).VisibleDateRange);
        }));
        this.ShowBusyIndicator = false;
    }
    
    private bool CanExecuteOnDemandLoading(object sender)
    {
        return true;
    }
    
    private IEnumerable GetAppointments(DateRange dateRange)
    {
        var appointments = new ScheduleAppointmentCollection();
        appointments.Add(new ScheduleAppointment
        {
            StartTime = dateRange.ActualStartDate.AddHours(10),
            EndTime = dateRange.ActualStartDate.AddHours(11),
            Subject = &quot;Meeting&quot;,
        });
        return appointments;
    }
    

    }

    See Also
    QueryAppointments
    LoadOnDemandCommand

    MaximumDate

    Gets or sets the maximum display date for scheduler to restrict the visible dates.

    Declaration
    public DateTime MaximumDate { get; set; }
    Property Value
    Type
    System.DateTime
    Remarks

    The dates after maximum date will be disabled in UI and built-in navigation options are disabled to navigate beyond maximum date. Also, navigation and selection before minimum and beyond maximum dates using DisplayDate is not possible. Selection after maximum dates and before minimum dates using the SelectedDate is not possible.

    Examples

    The code below sets the MaximumDate to Scheduler

    #[C#](#tab/tabid-30)
    this.Schedule.MaximumDate = new DateTime(2022, 12, 31);
    See Also
    MinimumDate
    NavigateTo(DateTime)
    DisplayDate
    SelectedDate
    Forward()
    Backward()
    StartHour
    EndHour

    MinimumDate

    Gets or sets the minimum display date for scheduler to restrict the visible dates.

    Declaration
    public DateTime MinimumDate { get; set; }
    Property Value
    Type
    System.DateTime
    Remarks

    The dates before minimum date will be disabled in UI and built-in navigation options are disabled to navigate beyond minimum date. Also, navigation and selection before minimum and beyond maximum dates using DisplayDate is not possible. Selection before minimum dates and beyond maximum dates using the SelectedDate is not possible.

    Examples

    The code below sets the MinimumDate to Scheduler

    #[C#](#tab/tabid-29)
    this.Schedule.MinimumDate = new DateTime(2020, 1, 1);
    See Also
    MaximumDate
    DisplayDate
    NavigateTo(DateTime)
    Backward()
    Forward()
    SelectedDate
    StartHour
    EndHour

    MonthViewSettings

    Gets or sets properties which allows to customize the month view of the SfScheduler.

    Declaration
    public MonthViewSettings MonthViewSettings { get; set; }
    Property Value
    Type Description
    MonthViewSettings

    The properties settings used to customize the month view.

    Examples

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
    ViewType="Month" >
    <syncfusion:SfScheduler.MonthViewSettings>
    <syncfusion:MonthViewSettings ShowAgendaView = "True"
                                  AppointmentDisplayMode="Indicator"
                                  AgendaViewHeight="300"
                                  AppointmentDisplayCount="4"
                                  MonthNavigationDirection="Vertical"
                                  DateFormat="dd"
                                  ViewHeaderDayFormat="dddd"
                                  ViewHeaderHeight="100"
                                  LeadingDaysVisibility="Collapsed"
                                  TrailingDaysVisibility="Collapsed"
                                  ShowWeekNumber="True"
                                  />
    </ syncfusion:SfScheduler.MonthViewSettings>
    </syncfusion:SfScheduler>

    #C#

    this.Schedule.ViewType = SchedulerViewType.Month;
    this.Schedule.MonthViewSettings.ShowAgendaView = true;
    this.Schedule.MonthViewSettings.AppointmentDisplayMode = AppointmentDisplayMode.Indicator;
    this.Schedule.MonthViewSettings.AgendaViewHeight = 300;
    this.Schedule.MonthViewSettings.AppointmentDisplayCount = 4;
    this.Schedule.MonthViewSettings.MonthNavigationDirection = MonthNavigationDirection.Vertical;
    this.Schedule.MonthViewSettings.DateFormat = "dd";
    this.Schedule.MonthViewSettings.ViewHeaderDayFormat = "dddd";
    this.Schedule.MonthViewSettings.ViewHeaderHeight = 100;
    this.Schedule.MonthViewSettings.LeadingDaysVisibility = Collapsed.
    this.Schedule.MonthViewSettings.TrailingDaysVisibility = Collapsed.Collapsed;
    this.Schedule.MonthViewSettings.ShowWeekNumber = true;
    See Also
    MonthViewSettings
    Month

    ResourceCollection

    Gets or sets the resource collection that has been added to the scheduler to display the appointments grouped under the resource.

    Declaration
    public IEnumerable ResourceCollection { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable
    Remarks

    Scheduler supports displaying appointments in day, week, workweek and timeline views based on resources. Month view shows appointments without grouping. When the ResourceCollection have the items of type other than SchedulerResource, then scheduler uses ResourceMapping to map SchedulerResource properties and data source fields. No resource view will be shown, even a resource added using the ResourceCollection property when the ResourceGroupType property value is set to None.

    Examples

    #Xaml

    <syncfusion:SfScheduler x:Name="Schedule"
                            ViewType="Week"
                            ResourceGroupType="resource"
                            ResourceCollection="{Binding ResourceCollection}"/>

    #C#

    var ResourceCollection = new ObservableCollection<SchedulerResource>()
    {
    new SchedulerResource() { Name = "Sophia", Background = new SolidColorBrush(Colors.Red), Id = "1000" },
    new SchedulerResource() { Name = "Zoey Addison", Background = new SolidColorBrush(Colors.Blue), Id = "1001" },
    new SchedulerResource() { Name = "James William", Background = new SolidColorBrush(Colors.Yellow), Id = "1002" },
    };
    schedule.ResourceCollection = ResourceCollection;
    See Also
    ResourceGroupType
    ResourceMapping
    SchedulerResource
    Day
    Week
    WorkWeek
    TimelineDay
    TimelineMonth
    TimelineWeek
    TimelineWorkWeek

    ResourceGroupType

    Gets or sets the type specifying whether the dates should be grouped under resource or resources should be grouped within a date.

    Declaration
    public ResourceGroupType ResourceGroupType { get; set; }
    Property Value
    Type Description
    ResourceGroupType

    None if the appointments are not grouped based on resources. The default value is Resource. Resources can be added to the scheduler by setting the ResourceGroupType property as Resource in SfScheduler. Need to set the Id, Name, Foreground and Background properties of SchedulerResource to create a resource. Add the resource to the scheduler by using the ResourceCollection property of SfScheduler and you can also add or remove the scheduler resources dynamically.

    Remarks

    Scheduler supports displaying appointments in day, week, workweek and timeline views based on resources. Month view shows resource-based appointments without grouping.

    Examples

    The code below sets the resource group type to Scheduler

    #[Xaml](#tab/tabid-11/tabid-1)
    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                            ViewType="Week"
                            ResourceGroupType="Resource"
                            ResourceCollection="{Binding Resources}"/>
    #[C#](#tab/tabid-11/tabid-2)
    public class MainViewModel
    {
        private ObservableCollection<object> resources;
        public ObservableCollection<object> Resources
        {
            get
            {
                return resources;
            }
            set
            {
                resources = value;
                RaisePropertyChanged("Resources");
            }
            public ResourceViewModel()
            {
                Resources = new ObservableCollection<object>()
                {
                    new SchedulerResource() { Name = "Sophia", Background = new SolidColorBrush(Colors.Red), Id = "1000" },
                    new SchedulerResource() { Name = "Zoey Addison", Background = new SolidColorBrush(Colors.Blue), Id = "1001" },
                    new SchedulerResource() { Name = "James William", Background = new SolidColorBrush(Colors.Yellow), Id = "1002" },
                };
            }
        }
    }
    See Also
    VisibleResourceCount
    ResourceCollection
    ResourceMapping
    SchedulerResource
    ResourceHeaderTemplate
    ResourceHeaderTemplateSelector

    ResourceHeaderTemplate

    Gets or sets the System.Windows.DataTemplate that defines the visual representation of the scheduler resource header.

    Declaration
    public DataTemplate ResourceHeaderTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The object that defines the visual representation of the resource header view. The registered default is null.

    Remarks

    By default, the SchedulerResource is set as the DataContext for ResourceHeaderTemplate for both SchedulerResource and custom data object in ResourceCollection. Custom data object can be bound in ResourceHeaderTemplate by using Data.

    Examples

    #Model

    The following sample used to configure the custom resources and resource header template.

    public class Employee
    {
        public string Name { get; set; }
        public object ID { get; set; }
        public Brush ForegroundBrush { get; set; }
        public Brush BackgroundBrush { get; set; }
    }
    #[C#](#tab/tabid-45)
    var resourceCollection = new ObservableCollection<object>();
    Employee employee = new Employee();
    employee.Name = "Sophiya";
    employee.BackgroundBrush = new SolidColorBrush(Colors.bk;
    employee.ID = 1;
    employee.ForegroundBrush = new SolidColorBrush(Colors.White);
    resourceCollection.Add(employee);
    this.scheduler.ResourceCollection = resourceCollection;
    #[Xaml](#tab/tabid-46)
    <Window.Resources>
        <DataTemplate x:Key="resourceTemplate">
            <StackPanel Background = "{Binding Data.BackgroundBrush}"
                   VerticalAlignment="Stretch"
                   HorizontalAlignment="Stretch">
                <TextBlock
                    Text = "{Binding Data.Name}"
                    Foreground="{Binding Data.ForegroundBrush}"
                    VerticalAlignment="Center"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="Wrap"
                    TextAlignment="Left"/>
            </StackPanel>
        </DataTemplate>
    </Window.Resources>
    

    <syncfusion:SfScheduler x:Name="schedule" ResourceHeaderTemplate="{StaticResource resourceTemplate}"> <sync:SfScheduler.ResourceMapping> <sync:ResourceMapping Id = "ID" Name="Name" Background="BackgroundBrush" Foreground="ForegroundBrush"/> </sync:SfScheduler.ResourceMapping> </syncfusion:SfScheduler>

    See Also
    ResourceHeaderTemplateSelector

    ResourceHeaderTemplateSelector

    Gets or sets the template selector for choosing a template based on Resource header.

    Declaration
    public DataTemplateSelector ResourceHeaderTemplateSelector { get; set; }
    Property Value
    Type
    System.Windows.Controls.DataTemplateSelector
    Remarks

    By default, the SchedulerResource is set as the DataContext for ResourceHeaderTemplateSelector for both SchedulerResource and custom data object in ResourceCollection. Custom data objects can be bound in ResourceHeaderTemplateSelector by using Data.

    Examples

    The following sample used to configure the custom resources and resource header template selector.

    #[Model](#tab/tabid-47)
    public class Employee
    {
        public string Name { get; set; }
        public object ID { get; set; }
        public Brush ForegroundBrush { get; set; }
        public Brush BackgroundBrush { get; set; }
    }
    #[Resources](#tab/tabid-48)
    <Window.Resources>
        <DataTemplate x:Key="availableResourceTemplate">
            <StackPanel Background = "{Binding Data.BackgroundBrush}"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Stretch">
                <TextBlock
                    Text = "{Binding Data.Name}"
                    Foreground="{Binding Data.ForegroundBrush}"
                    VerticalAlignment="Center"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="Wrap"
                    TextAlignment="Left"/>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="unavailableResourceTemplate">
            <StackPanel Background = "{Binding Data.BackgroundBrush}"
                        VerticalAlignment="Stretch"
                        HorizontalAlignment="Stretch">
                <TextBlock
                    Text = "{Binding Data.Name}"
                    Foreground="{Binding Data.ForegroundBrush}"
                    VerticalAlignment="Center"
                    TextTrimming="CharacterEllipsis"
                    TextWrapping="Wrap"
                    TextAlignment="Left"/>
            </StackPanel>
        </DataTemplate>
        <local:DataTemplateSelectorHelper x:Key="dataTemplateSelector"
                                          AvailableResourceTemplate="{StaticResource availableResourceTemplate}"
                                          UnavailableResourceTemplate="{StaticResource unavailableResourceTemplate}" />
    </Window.Resources>
    #[DataTemplateSelector](#tab/tabid-49)
    public class DataTemplateSelectorHelper : DataTemplateSelector
    {
        public DataTemplate AvailableResourceTemplate { get; set; }
        public DataTemplate UnavailableResourceTemplate { get; set; }
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            if ((item as SchedulerResource).Id.Equals("2") || (item as SchedulerResource).Id.Equals("4"))
            {
               return UnavailableResourceTemplate;
            }
            return AvailableResourceTemplate;
        }
    }
    #[C#](#tab/tabid-50)
    var resourceCollection = new ObservableCollection<object>();
    Employee employee = new Employee();
    employee.Name = "Sophiya";
    employee.BackgroundBrush = new SolidColorBrush(Colors.bk;
    employee.ID = 1;
    employee.ForegroundBrush = new SolidColorBrush(Colors.White);
    resourceCollection.Add(employee);
    this.scheduler.ResourceCollection = resourceCollection;
    #[Xaml](#tab/tabid-51)
    <syncfusion:SfScheduler x:Name="schedule" ResourceHeaderTemplateSelector="{StaticResource dataTemplateSelector}">
        <sync:SfScheduler.ResourceMapping>
           <sync:ResourceMapping
               Id = "ID"
               Name="Name"
               Background="BackgroundBrush"
               Foreground="ForegroundBrush"/>
       </sync:SfScheduler.ResourceMapping>
    </syncfusion:SfScheduler>
    See Also
    ResourceHeaderTemplate

    ResourceMapping

    Gets or sets ResourceMapping object that denotes the mapping of SchedulerResource properties to the data source fields. ResourceMapping class contains a set of properties whose names are similar to the properties of SchedulerResource.

    Declaration
    public ResourceMapping ResourceMapping { get; set; }
    Property Value
    Type
    ResourceMapping
    Remarks

    Custom resource class should contain a mandatory field for resource Id. For dynamic changes, custom resource should inherit from INotifyPropertyChanged. Data property is used to get the details of custom data.

    Examples

    #Model

    Create a custom class Employee with mandatory fields Name, Id, ForegroundColor and BackgroundColor. Also can assign resources to recurrence appointments.

    public class Employee
    {
       public string Name { get; set; }
       public string Id { get; set; }
       public Brush BackgroundColor { get; set; }
       public Brush ForegroundColor { get; set; }
    }
    #[ViewModel](#tab/tabid-13)

    Add resources of Employee collection that can be assigned to scheduler using the ResourceCollection property which is of IEnumerable type. Also can be add or remove scheduler resources dynamically.

    public class MainViewModel
    {
        private ObservableCollection<Employee> resources;
        public ObservableCollection<Employee> Resources
        {
            get
            {
                return resources;
            }
            set
            {
                resources = value;
                RaisePropertyChanged("Resources");
            }
            public ResourceViewModel()
            {
                Resources = new ObservableCollection<Employee>()
                {
                    new Employee() { Name = "Sophia", BackgroundColor  = new SolidColorBrush(Colors.Red), Id = "1000",ForegroundColor = new SolidColorBrush(Colors.White) },
                    new Employee() { Name = "Zoey Addison", BackgroundColor  = new SolidColorBrush(Colors.Blue), Id = "1001",ForegroundColor = new SolidColorBrush(Colors.Red) },
                    new Employee() { Name = "James William", BackgroundColor  = new SolidColorBrush(Colors.Yellow), Id = "1002",ForegroundColor = new SolidColorBrush(Colors.Yellow) },
                };
            }
        }
    }
    #[MainWindow](#tab/tabid-14)

    Map the properties of Employee class with SfScheduler control using Scheduler ResourceMapping.

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                            ViewType="Week"
                            ResourceGroupType="Resource"
                            ResourceCollection="{Binding Resources}">
           <Schedule:SfScheduler.ResourceMapping>
                <Schedule:ResourceMapping Id = "Id" Name="Name" Background="BackgroundColor" Foreground="ForegroundColor"/>
           </Schedule:SfScheduler.ResourceMapping>
    </Schedule:SfScheduler>
    See Also
    SchedulerResource
    ResourceCollection
    AppointmentMapping
    ResourceGroupType
    ResourceHeaderTemplate
    ResourceHeaderTemplateSelector

    SelectedDate

    Gets or sets the selected date programmatically by binding it from the view model.

    Declaration
    public DateTime? SelectedDate { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTime>

    The selected date.

    Remarks

    Selection before MinimumDate and beyond MaximumDate using the SelectedDate is not possible.

    Examples

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="schedule"
                         SelectedDate="{Binding SelectedDate, Mode=TwoWay}">
    </syncfusion:SfScheduler>

    #C#

    schedule.SetBinding(SfScheduler.SelectedDateProperty, new Binding("SelectedDate", BindingMode.TwoWay));
    public class MainViewModel
    {
        public DateTime SelectedDate { get; set; }
        public MainViewModel()
        {
            SelectedDate = new DateTime(2020, 02, 05);
        }
    }
    See Also
    MinimumDate
    MaximumDate

    ShowBusyIndicator

    Gets or sets a value indicating whether to show the busy indicator.

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

    The default value is false.

    Remarks

    You might start and stop the animation before and after the appointments loaded with QueryAppointments , LoadOnDemandCommand. You might stop the animation if ShowBusyIndicator is set to True after SfScheduler loaded into view.

    Examples

    #C#

    this.Schedule.ShowBusyIndicator = true;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       ShowBusyIndicator="True">
    </syncfusion:SfScheduler>
    See Also
    QueryAppointments

    ShowDatePickerButton

    Gets or sets a value indicating whether to display the date picker when the scheduler header date is clicked. The date picker will be used for quick date navigation in the SfScheduler. It also shows today's navigation button on header view.

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

    The default value is true.

    Remarks

    DatePicker will not be shown if CalendarIdentifier is specified other than "GregorianCalendar".

    Examples

    #C#

    this.Schedule.ShowDatePickerButton = true;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       ShowDatePickerButton="True">
    </syncfusion:SfScheduler>

    TimelineViewSettings

    Gets or sets the settings to configure TimelineDay, TimelineWeek, TimelineWorkWeek and TimelineMonth views.

    Declaration
    public TimelineViewSettings TimelineViewSettings { get; set; }
    Property Value
    Type
    TimelineViewSettings
    Remarks

    You can set different TimelineViewSettings based on TimelineDay , TimelineWeek , TimelineWorkWeek and TimelineMonth view by using ViewChanged event when ViewType changed.

    Examples

    #Xaml

    The following sample used to configure the Scheduler Timeline views.

    <syncfusion:SfScheduler x:Name="Schedule" ViewType="TimelineDay">
    <syncfusion:SfScheduler.TimelineViewSettings>
    <syncfusion:TimelineViewSettings StartHour = "8"
                                     EndHour="15"
                                     TimeRulerSize="100"
                                     ViewHeaderDateFormat="dd/MMMM"
                                     ViewHeaderHeight="100"
                                     TimelineAppointmentHeight="100"
                                     TimeIntervalHeight="120"
                                     DaysCount="2"/>
            </syncfusion:SfScheduler.TimelineViewSettings>
     </syncfusion:SfScheduler>
    #[C#](#tab/tabid-39)
    this.Schedule.ViewType = SchedulerViewType.TimelineDay;
    this.Schedule.TimelineViewSettings.TimeIntervalHeight = "120";
    this.Schedule.TimelineViewSettings.StartHour="8";
    this.Schedule.TimelineViewSettings.EndHour="15";
    this.Schedule.TimelineViewSettings.DaysCount = 2;
    this.Schedule.TimelineViewSettings.TimeRulerSize="100";
    this.Schedule.TimelineViewSettings.TimeRulerFormat = "hh mm";
    this.Schedule.TimelineViewSettings.ViewHeaderDateFormat = "dd/MMMM";
    this.Schedule.TimelineViewSettings.ViewHeaderHeight = 100;
    this.Schedule.TimelineViewSettings.TimelineAppointmentHeight = 100;
    See Also
    TimelineViewSettings
    ViewType
    ViewChanged
    TimelineDay
    TimelineWeek
    TimelineWorkWeek
    TimelineMonth

    TimeZone

    Gets or sets a time zone for the schedule control to create appointments in various time zones and displays the appointments on any time zones customer wants.

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

    Time zone can be used in following scenarios. Create appointments in different time zones. Display appointments based on the client’s time zone. Display appointments based on scheduler time zone. Display appointments at the same time everywhere regardless of client’s time zone.

    Remarks

    If the recurring appointment is converted to another time zone, then the whole sequence will be recalculated according to the new time zone information. If all-day appointment created, its start time and end time will be set to 12 AM and 12 AM by default, So time zone is not applicable for all-day appointments. Scheduler supports daylight saving time. TimeZone can be used for custom appointments by mapping the StartTimeZone and EndTimeZone custom properties of AppointmentMapping.

    Examples

    The code below sets the TimeZone to appointments.

    #[C#](#tab/tabid-19)
    var appointments = new ScheduleAppointmentCollection();
    appointments.Add(new ScheduleAppointment()
    {
       Subject = "Meeting",
       StartTime = DateTime.Now,
       EndTime = DateTime.Now.AddHours(1),
       StartTimeZone = "India Standard Time",
       EndTimeZone = "India Standard Time"
    });
    Schedule.ItemsSource = appointments;
    See Also
    ScheduleAppointment
    StartTimeZone
    EndTimeZone
    StartTime
    EndTime
    AppointmentMapping

    ToolTipTemplate

    Gets or sets the data template to use for customizing the appearance of tool tips for appointments in the SfScheduler.

    Declaration
    public DataTemplate ToolTipTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The default value is null.

    Remarks

    The ScheduleAppointment will be set as data context. This property will be applicable only when EnableToolTip property is enabled.

    Examples

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                            EnableToolTip="True">
       <syncfusion:SfScheduler.ToolTipTemplate>
           <DataTemplate>
               <Border x:Name="PART_ToolTipBorder"
                       BorderBrush="{Binding AppointmentBackground}"
                       Background="{Binding AppointmentBackground}" 
                       CornerRadius="4"
                       VerticalAlignment="Stretch" 
                       HorizontalAlignment="Stretch"
                       Padding="5">
                   <TextBlock x:Name="PART_DisplayTextBlock"
                              Text="{Binding Subject}" 
                              Foreground="White"
                              FontSize="12"
                              TextWrapping="Wrap"
                              TextTrimming="CharacterEllipsis"
                              VerticalAlignment="Center" 
                              HorizontalAlignment="Center" />
               </Border>
           </DataTemplate>
       </syncfusion:SfScheduler.ToolTipTemplate>
    </syncfusion:SfScheduler>

    ViewType

    Gets or sets the built in views such day, week, workweek, timeline and month view of the SfScheduler.

    Declaration
    public SchedulerViewType ViewType { get; set; }
    Property Value
    Type Description
    SchedulerViewType

    The default view mode is Month. It allows users to easily select and navigate between all built-in views.

    Examples

    #C#

    this.Schedule.ViewType = SchedulerViewType.Week;

    #Xaml

    <?xml version = "1.0" encoding="utf-8"?>
    <syncfusion:SfScheduler x:Name="Schedule"
                       ViewType="Week" >
    </syncfusion:SfScheduler>
    See Also
    Day
    Month
    TimelineDay
    TimelineMonth
    TimelineWeek
    TimelineWorkWeek
    Week
    WorkWeek
    MonthViewSettings
    DaysViewSettings
    TimelineViewSettings

    Methods

    Backward()

    Backward to viewing the previous immediate visible dates in the scheduler. It will move to previous month if the scheduler view is month, similarly it will move to previous week for week view and previous day for day view.

    Declaration
    public void Backward()
    Examples

    #Xaml

    <syncfusion:SfScheduler x:Name="Schedule"
                            MinimumDate="2020-05-05 10:0:0">
    </syncfusion:SfScheduler>
    <Button x:Name="Backward"
    Content="bwd"
       Click="Backward_Click">
    </Button>

    #C#

    private void Backward_Click(object sender, RoutedEventArgs e)
    {
        Schedule.Backward();
    }
    See Also
    Forward()
    MinimumDate
    MaximumDate
    DisplayDate
    SelectedDate

    ClearSelection()

    Method to clear the selected timeslot and month cell selections.

    Declaration
    public void ClearSelection()

    ClearSelections()

    Method to clear the selected timeslot and month cell selections.

    Declaration
    [Obsolete("ClearSelections() is deprecated, use ClearSelection() instead")]
    public void ClearSelections()

    Dispose()

    Disposes all the resources used by the SfScheduler class.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes all the resources used by the SfScheduler class.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Indicates whether the call is from Dispose method or from a System.GC.SuppressFinalize(System.Object).

    Forward()

    Forwards to next immediate visible dates in the scheduler. It will move to next month if the scheduler view is month, similarly it will move to next week for week view and next day for day view.

    Declaration
    public void Forward()
    Examples

    #Xaml

    <syncfusion:SfScheduler x:Name="Schedule"
                            MaximumDate="2020-05-05 10:0:0">
    </syncfusion:SfScheduler>
    <Button x:Name="Forward"
    Content="fwd"
       Click="Forward_Click">
    </Button>

    #C#

    private void Forward_Click(object sender, RoutedEventArgs e)
    {
        Schedule.Forward();
    }
    See Also
    Backward()
    MinimumDate
    MaximumDate
    DisplayDate
    SelectedDate

    MeasureOverride(Size)

    Called to determine the size requirements for this panel and all of its children.

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    System.Windows.Size availableSize

    The available size that this object can give to child objects.

    Returns
    Type Description
    System.Windows.Size

    The available size.

    NavigateTo(DateTime)

    Navigates to specific date.

    Declaration
    public void NavigateTo(DateTime dateTime)
    Parameters
    Type Name Description
    System.DateTime dateTime

    the date time.

    OnApplyTemplate()

    Override Method to apply the template.

    Declaration
    public override void OnApplyTemplate()

    OnPreviewKeyDown(KeyEventArgs)

    Method to handle key board interaction with schedule day cells.

    Declaration
    protected override void OnPreviewKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The pressed key arguments.

    ShowReminderAlert()

    Shows reminder alert window when EnableReminder is set to true.

    Declaration
    public void ShowReminderAlert()
    See Also
    EnableReminder
    Reminders
    ReminderMapping
    SchedulerReminder
    ReminderAlertOpening

    Events

    AppointmentDeleting

    This event occurs when the scheduler appointment is being deleted by pressing delete key. You can cancel the deleting operation and also decide whether to delete the series or particular occurrence when deleting occurrence of pattern appointment.

    Declaration
    public event EventHandler<AppointmentDeletingEventArgs> AppointmentDeleting
    Event Type
    Type
    System.EventHandler<AppointmentDeletingEventArgs>
    Remarks

    You can cancel the deletion of an appointment by setting the event argument property System.ComponentModel.CancelEventArgs.Cancel as true. When deleting Occurrence appointment.

    AppointmentDragOver

    Occurs when the user dragging the appointment.

    Declaration
    public event EventHandler<AppointmentDragOverEventArgs> AppointmentDragOver
    Event Type
    Type
    System.EventHandler<AppointmentDragOverEventArgs>

    AppointmentDragStarting

    Occurs when the user start to drag the appointment.

    Declaration
    public event EventHandler<AppointmentDragStartingEventArgs> AppointmentDragStarting
    Event Type
    Type
    System.EventHandler<AppointmentDragStartingEventArgs>

    AppointmentDropping

    Occurs when the user dropping the appointment.

    Declaration
    public event EventHandler<AppointmentDroppingEventArgs> AppointmentDropping
    Event Type
    Type
    System.EventHandler<AppointmentDroppingEventArgs>

    AppointmentEditorClosing

    This event occurs when the user performs the save, delete and cancel action in the appointment editor window. You can cancel or handle this event using the System.ComponentModel.CancelEventArgs.Cancel and Handled properties of event argument.

    Declaration
    public event EventHandler<AppointmentEditorClosingEventArgs> AppointmentEditorClosing
    Event Type
    Type
    System.EventHandler<AppointmentEditorClosingEventArgs>
    Remarks

    You can cancel the appointment editor from being closed by setting the System.ComponentModel.CancelEventArgs.Cancel property as true. You can use the Handled property to handle the Action in handler. For example, when user edits the appointment and clicks Save button in the appointment editor, Scheduler saves the edited values in underlying appointment. If you set Handled as true, then appointment editor will be closed, and values won’t get saved in underlying appointment. You need to write the code in handler to save the edited values in handler.

    AppointmentEditorOpening

    This event occurs before the appointment editor is shown when you double-click the appointment or empty timeslot cell. Appointment Editor used to edit the appointment or to create a new appointment.

    Declaration
    public event EventHandler<AppointmentEditorOpeningEventArgs> AppointmentEditorOpening
    Event Type
    Type
    System.EventHandler<AppointmentEditorOpeningEventArgs>
    Remarks

    when the user double clicks on the appointment, this event occurs before the appointment editor is displayed to edit the tapped appointment. If user double clicks on the empty time slot, this event occurs before appointment editor is displayed to add new appointment. You can cancel the showing appointment editor by cancelling this event using System.ComponentModel.CancelEventArgs.Cancel.

    AppointmentResizing

    Occurs for every Action when user resizes an appointment.

    Declaration
    public event EventHandler<AppointmentResizingEventArgs> AppointmentResizing
    Event Type
    Type
    System.EventHandler<AppointmentResizingEventArgs>

    AppointmentTapped

    Occurs when schedule appointment get tapped in all view.

    Declaration
    public event EventHandler<AppointmentTappedArgs> AppointmentTapped
    Event Type
    Type
    System.EventHandler<AppointmentTappedArgs>

    CellDoubleTapped

    Occurs when the user double clicks the cell in Scheduler.

    Declaration
    public event EventHandler<CellDoubleTappedEventArgs> CellDoubleTapped
    Event Type
    Type
    System.EventHandler<CellDoubleTappedEventArgs>

    CellLongPressed

    Occurs when the user long presses the cell in Scheduler.

    Declaration
    public event EventHandler<CellLongPressedEventArgs> CellLongPressed
    Event Type
    Type
    System.EventHandler<CellLongPressedEventArgs>

    CellTapped

    Occurs when the user clicks or touch the cell in Scheduler.

    Declaration
    public event EventHandler<CellTappedEventArgs> CellTapped
    Event Type
    Type
    System.EventHandler<CellTappedEventArgs>

    HeaderTapped

    Occurs when the user clicks or touch the Scheduler header.

    Declaration
    public event EventHandler<HeaderTappedEventArgs> HeaderTapped
    Event Type
    Type
    System.EventHandler<HeaderTappedEventArgs>

    QueryAppointments

    Occurs after the visible date range changed or ViewType changed or ResourceCollection changed. ItemsSource for the visible date range can be loaded in on-demand using this event.

    Declaration
    public event EventHandler<QueryAppointmentsEventArgs> QueryAppointments
    Event Type
    Type
    System.EventHandler<QueryAppointmentsEventArgs>
    Remarks

    Use QueryAppointments to load the appointments in on-demand for visible date range. Loading appointments in on-demand improves the loading performance when you have appointments ranging for multiple years. Once the ViewChanged event is raised, QueryAppointments will be raised. If an appointment has been added, deleted or updated within the visible date range, then the QueryAppointments event will not be triggered. Since appointments were already loaded for that visible date range. When the ResourceCollection is updated, the QueryAppointments event will be raised. When the ResourceGroupType is changed, the QueryAppointments event will be raised. The recurrence appointment should be added to the ItemsSource until the date of recurrence ends. If RecurrenceRule added with count or end date, you can use the method to get recurrence date collection and compare recursive dates in the VisibleDateRange current visible date range then add recurrence appointment in ItemsSource if recursive dates in current visible date range. If RecurrenceRule added with no end date , then recurrence appointment should be added in the ItemsSource when all visible date changed from the recurrence start date.

    Examples

    The following example describes to load appointments on demand using QueryAppointments event.

    #[C#](#tab/tabid-4)
     this.scheduler.QueryAppointments += OnSchedulerQueryAppointments;
    

    private async void OnSchedulerQueryAppointments(object sender, QueryAppointmentsEventArgs e) { this.scheduler.ShowBusyIndicator = true; await this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() => { this.scheduler.ItemsSource = this.GetAppointments(e.VisibleDateRange); })); this.scheduler.ShowBusyIndicator = false; }

    RecurringAppointmentBeginningEdit

    Occurs when the double tapped or delete key pressed on the recurring appointment.

    Declaration
    public event EventHandler<RecurringAppointmentBeginningEditEventArgs> RecurringAppointmentBeginningEdit
    Event Type
    Type
    System.EventHandler<RecurringAppointmentBeginningEditEventArgs>

    ReminderAlertActionChanged

    Occurs when the user performs the dismiss, dismiss all, and snooze reminder actions for the appointment in the reminder alert window.

    Declaration
    public event EventHandler<ReminderAlertActionChangedEventArgs> ReminderAlertActionChanged
    Event Type
    Type
    System.EventHandler<ReminderAlertActionChangedEventArgs>
    Remarks

    EnableReminder must be true to enable the appointment reminder.

    Examples

    The following example shows how to listen to reminder alert action changes using ReminderAlertActionChanged event.

    #[C#](#tab/tabid-5)
    this.scheduler.ReminderAlertActionChanged += OnSchedulerReminderAlertActionChanged;
    

    private void OnSchedulerReminderAlertActionChanged(object sender, ReminderAlertActionChangedEventArgs e) { if(e.ReminderAction == ReminderAction.Dismiss) { var reminders = e.Reminders[0]; } else if (e.ReminderAction == ReminderAction.DismissAll) { var reminders = e.Reminders; } else if (e.ReminderAction == ReminderAction.Snooze) { var reminders = e.Reminders[0]; var snoozeTime = e.SnoozeTime; } }

    See Also
    EnableReminder
    ReminderAlertActionChangedEventArgs
    SchedulerReminder
    Data
    ReminderAction

    ReminderAlertOpening

    Occurs before the alert window is displayed with list of reminders for the reminder alert time ReminderTimeInterval mentioned in Reminders.

    Declaration
    public event EventHandler<ReminderAlertOpeningEventArgs> ReminderAlertOpening
    Event Type
    Type
    System.EventHandler<ReminderAlertOpeningEventArgs>
    Remarks

    EnableReminder must be true to enable the appointment reminders.

    Examples

    The following example describes how to listen reminder alert opening using ReminderAlertOpening event.

    this.Schedule.ReminderAlertOpening += OnSchedulerReminderAlertOpening;
    private void OnSchedulerReminderAlertOpening(object sender, ReminderAlertOpeningEventArgs e)
    {
    var reminders = e.Reminders;
    }
    See Also
    EnableReminder
    ReminderAlertOpeningEventArgs
    SchedulerReminder
    ReminderTimeInterval

    SchedulerContextMenuOpening

    Occurs when AppointmentContextMenu or CellContextMenu of scheduler is opened.

    Declaration
    public event EventHandler<SchedulerContextMenuOpeningEventArgs> SchedulerContextMenuOpening
    Event Type
    Type
    System.EventHandler<SchedulerContextMenuOpeningEventArgs>
    Remarks

    You can cancel the showing the scheduler AppointmentContextMenu or CellContextMenu by setting the System.ComponentModel.CancelEventArgs.Cancel property as true.

    SelectionChanged

    Occurs after the selection is changed in Scheduler.

    Declaration
    public event EventHandler<SelectionChangedEventArgs> SelectionChanged
    Event Type
    Type
    System.EventHandler<SelectionChangedEventArgs>

    SelectionChanging

    Occurs when the selection is get changing in Scheduler.

    Declaration
    public event EventHandler<SelectionChangingEventArgs> SelectionChanging
    Event Type
    Type
    System.EventHandler<SelectionChangingEventArgs>

    ViewChanged

    Occurs view changed on swiping and schedule views switched.

    Declaration
    public event EventHandler<ViewChangedEventArgs> ViewChanged
    Event Type
    Type
    System.EventHandler<ViewChangedEventArgs>

    ViewHeaderCellTapped

    Occurs when the user clicks or touch the view header cell in Scheduler.

    Declaration
    public event EventHandler<ViewHeaderCellTappedEventArgs> ViewHeaderCellTapped
    Event Type
    Type
    System.EventHandler<ViewHeaderCellTappedEventArgs>

    WeekNumberTapped

    Occurs when the user clicks or touch the week number in month view.

    Declaration
    public event EventHandler<WeekNumberTappedEventArgs> WeekNumberTapped
    Event Type
    Type
    System.EventHandler<WeekNumberTappedEventArgs>

    Implements

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