Hi All,
Need little help here.
About SeletedAppt background:
I am using theme like the online demo.
<
telerik:Windows7Theme
x:Key
=
"Theme"
/>
<
telerik:RadScheduleView
telerik:StyleManager.Theme="{StaticResource Theme} … …>
When I selected the Appt(s) the background color is not big difference with it before be selected. How do change that by simple way.
About ConfirmDialog:
When I click delete button on Ribbon (online demo first look),the DeleteConfirmDialog popup,But you don’t know which Appt to be deleted, because maybe selected Appt not on current page(view window).So my question is how do I add selectedAppt`s subject to ConfirmDialog.
4 Answers, 1 is accepted
In order to change the color of the selected Appointment you would need to create custom AppointmentStyleSelector in which you should replace the brushes for Selected VisualState into the different orientation ControlTemplates. For more information about the Appointment Style please check this article from our online documentation.
About the delete dialog you should create a custom DeleteAppointmentConfirmDialogStyle and modify its template to include all the information you need (the Style contains a reference to the marked for deletion appointments). For more detailed information please check the Custom Dialogs article from our documentation.
Hope this helps.
Regards,
Kalin
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>

Thanks very much.
I got ConfirmDialog.I hope this Additiondata is free.
private void xRadScheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
{
if ((e.DialogViewModel!=null) && (e.DialogViewModel is ConfirmDialogViewModel))
{
ConfirmDialogViewModel vm = e.DialogViewModel as ConfirmDialogViewModel;
Telerik.Windows.Controls.RadScheduleView radScheduleViewSender = sender as Telerik.Windows.Controls.RadScheduleView;
vm.AdditionalData = radScheduleViewSender.SelectedAppointments.ToList();
}
}
//---------------
<
ControlTemplate
x:Key
=
"DeleteAppointmentConfirmTemplate"
TargetType
=
"scheduleView:SchedulerDialog"
>
... ...
<
ListBox
Margin
=
"20,0,0,10"
BorderThickness
=
"0"
Grid.Row
=
"1"
Width
=
"auto"
DisplayMemberPath
=
"Subject"
ItemsSource
=
"{Binding AdditionalData}"
></
ListBox
>

The problem is Category. If there are no Category on a Appt, SeletedAppt background will show correct.
Can we do custom Category? At least We need two properties, one for SeletedAppt background, other one for Font color. I have 70+ Category. Some category’s background color are dark, so need light font color.
Straight to your questions:
- In order to show the selected background color when appointment has category set you need to switch borders named CommonStatesVisual and PART_Category inside the control template of AppointmentItemTemplate.
- I suggest that you create a custom property for the category foreground color. After that you could use it like:
<
Setter
Property
=
"Foreground"
Value
=
"{Binding Path=Category.CategoryForegroundBrush}"
/>
The approach is demonstrated in the attached project.
I hope it helps.
Regards,
Masha
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>