Hi everyone,
I would like to customize the AppointmentDialog and the RecurrenceDialog in same time but I have a problem.
So, I made in two ResourceDictionary a ControlTemplate foreach Dialog.
- <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="telerik:SchedulerDialog">...</ControlTemplate >
- <ControlTemplate x:Key="EditRecurrenceTemplate" TargetType="telerik:SchedulerDialog">...</ControlTemplate >
After that, I create another ResourceDictionary where I define the Styles :
- <Style BasedOn="{StaticResource EditRecurrenceDialogStyle}" TargetType="telerik:SchedulerDialog" x:Key="EditRecurrenceDialogStyle">
<Setter Property="Template" Value="{StaticResource EditRecurrenceTemplate}"/>
</Style> - <Style BasedOn="{StaticResource EditAppointmentDialogStyle}" TargetType="telerik:SchedulerDialog" x:Key="EditAppointmentDialogStyle">
<Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}"/>
</Style>
Then, in the telerik:RadScheduleView I set the proprieties in the following way :
- <telerik:RadScheduleView
...
AppointmentsSource="{Binding Appointments}"
EditRecurrenceDialogStyle="{StaticResource EditRecurrenceDialogStyle}"
EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}"
...>
When I test the styles individually it works. However when I test with both styles define, I have this error:
- ArgumentException: Item has already been added. Key in dictionary: 'Telerik.Windows.Controls.SchedulerDialog' Key being added: 'Telerik.Windows.Controls.SchedulerDialog'
How can I fix that ?
Thanks in advance for your help.