One way of achieving the desired result would be to create a class that derives from ScheduleViewDialogHostFactory and then, override its CreateNew method. After that, create a new variable and call the base CreateNew method, in order to create a new dialog host. Then, cast the newly created dialog host to a type of RadWindow. If the dialogType parameter (of the CreateNew method) equals DialogType.RecurrenceDialog, subscribe to the Loaded event of the cast RadWindow element. Through the ChildrenOfType extension method, retrieve the element with a type of SchedulerDialog. On it, set its Background property to the desired value. Finally, set the newly created custom dialog host factory to the SchedulerDialogHostFactory property of the RadScheduleView instance.
The following code snippets show this suggestion's implementation:
publicclassCustomScheduleViewDialogHostFactory : ScheduleViewDialogHostFactory
{
protectedoverride IScheduleViewDialogHost CreateNew(ScheduleViewBase scheduleView, DialogType dialogType)
{
var host = base.CreateNew(scheduleView, dialogType);
var window = host as RadWindow;
if (dialogType == DialogType.RecurrenceDialog)
{
window.Loaded -= Window_Loaded;
window.Loaded += Window_Loaded;
}
return host;
}
privatevoidWindow_Loaded(object sender, RoutedEventArgs e)
{
var window = (RadWindow)sender;
var schedulerDialog = window.ChildrenOfType<SchedulerDialog>().FirstOrDefault();
if (schedulerDialog != null)
{
schedulerDialog.Background = Brushes.Bisque;
}
}
}