New to Telerik UI for WinUI? Download free 30-day trial

Custom Dialogs

RadScheduler makes it easy to customize its dialogs. Each RadWindow dialog contains an instance of the SchedulerDialog control as Content. The ViewModel in the DataContext of the SchedulerDialog control is automatically provided and contains all needed properties for the corresponding dialog. RadScheduler exposes a Style property for each dialog which allows you to apply a Style on the SchedulerDialog control and modify its Template.

General information about RadScheduler dialogs

RadScheduler provides the following dialogs:

  • EditAppointmentDialog - shown when an appointment is about to be created or edited:

WinUI RadScheduler EditAppointmentDialog

In order to create a custom EditAppointmentDialog, use EditAppointmentDialogStyle property of the RadScheduler control. The DataContext of this Style target is an AppointmentDialogViewModel object. This class contains all the needed data for editing an appointment including the appointment itself. It can be reached by using the Occurrence property of the ViewModel and its Appointment property:

<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" 
   IsReadOnly="{Binding IsReadOnly}" 
   Text="{Binding Occurrence.Appointment.Subject, Mode=TwoWay}"/> 
Other important properties of the AppointmentDialogViewModel class include:
  • Categories /TimeMarkers – lists of ICategory/ ITimeMarker objects which can be set to the appointment. In the default EditAppointmentDialog these are used as a DataSource of two RadComboBoxes.

  • ResourceTypes - a list of ResourceTypeViewModel objects. Each object holds a list of the available resources for the given ResourceType. This collection is used as a DataSource of an ItemsControl with an ItemTemplate where a RadComboBox for each resource type is placed.

  • IsReadOnly – a boolean property bound to the IsEnabled property of all the controls in the dialog. This allows to make the dialog read-only by cancelling the AppointmentEditing event of the Scheduler – in this case the EditAppointmetDialog will be shown but all the fields will be disabled.

Check here for more details about customizing EditAppointmentDialog.

  • EditRecurrenceDialog – shown when a recurrence is created or edited:

WinUI RadScheduler EditRecurrenceDialog

EditRecurrenceDialogStyle property is used to customize this dialog. The DataContext of the dialog is a RecurrenceDialogViewModel object. It provides information about the RecurrencePattern which is set to the RecurrenceRule of the appointment.

More information about the recurring patterns can be found here.

  • DeleteAppointmentConfirmDialog - shown when the selected appointments are going to be deleted:

WinUI RadScheduler DeleteAppointmentConfirmDialog

DeleteAppointmentConfirmDialogStyle property should be set to modify this dialog. The DataContext of this Style target is of type ConfirmDialogViewModel. It contains a reference to the marked for deletion appointments through its Appointments property.

  • RecurrenceChoiceDialog/RecurrenceChoiceDeleteDialog – shown when a recurrent appointment is about to be edited/deleted:

WinUI RadScheduler RecurrenceChoiceDialogs

The ViewModel of all the RecurrenceChoice dialogs is a RecurrenceChoiceDialogViewModel object. Its boolean properties IsOccurrenceModeSelected/IsSeriesModeSelected show which option is selected in the dialog. The RecurrenceChoiceDialogMode property indicates which dialog is executed, its value is enumeration of type RecurrenceChoiceDialogMode representing each of the RecurrenceChoice dialogs. Also the class contains a reference to the appointment through its Occurrence property.

The ViewModels of all the Scheduler dialogs inherit from SchedulerDialogViewModel class. It provides the commands for confirming and cancelling the dialog.

In this article
Not finding the help you need?