This is a migrated thread and some comments may be shown as answers.

SeletedAppt background color and ConfirmDialog

4 Answers 128 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Wenjie
Top achievements
Rank 1
Wenjie asked on 23 Jul 2013, 06:55 PM

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

Sort by
0
Kalin
Telerik team
answered on 25 Jul 2013, 07:19 AM
Hi Wenjie,

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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
0
Wenjie
Top achievements
Rank 1
answered on 25 Jul 2013, 07:38 PM
Hi Kalin,
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>




0
Wenjie
Top achievements
Rank 1
answered on 25 Jul 2013, 07:54 PM
For SeletedAppt background :

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.

 

0
Masha
Telerik team
answered on 30 Jul 2013, 08:40 AM
Hi Wenjie,

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
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
Tags
ScheduleView
Asked by
Wenjie
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Wenjie
Top achievements
Rank 1
Masha
Telerik team
Share this question
or