SeletedAppt background color and ConfirmDialog

5 posts, 0 answers
  1. Wenjie
    Wenjie avatar
    35 posts
    Member since:
    Mar 2013

    Posted 23 Jul 2013 Link to this post

    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.

  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 25 Jul 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Wenjie
    Wenjie avatar
    35 posts
    Member since:
    Mar 2013

    Posted 25 Jul 2013 Link to this post

    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>




  5. Wenjie
    Wenjie avatar
    35 posts
    Member since:
    Mar 2013

    Posted 25 Jul 2013 Link to this post

    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.

     

  6. Masha
    Admin
    Masha avatar
    355 posts

    Posted 30 Jul 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready