Change Background color of a selected appointment

2 posts, 1 answers
  1. Marc-André Boulianne
    Marc-André Boulianne avatar
    1 posts
    Member since:
    Dec 2009

    Posted 18 Sep 2015 Link to this post

    Hi, 

     I try to customize the appointment of a scheduleview. I use the following code to change the backgroud color. But I also need to change the background color when the appointment is selected. How can we change it ?

     

            <scheduleview:OrientedAppointmentItemStyleSelector x:Key="AppointmentItemStyleSelector">
                <scheduleview:OrientedAppointmentItemStyleSelector.VerticalStyle>
                    <Style TargetType="scheduleview:AppointmentItem" BasedOn="{StaticResource AppointmentItemBaseStyle}">
                        <Setter Property="Background" Value="#C1D72E" />
                    </Style>
                </scheduleview:OrientedAppointmentItemStyleSelector.VerticalStyle>
            </scheduleview:OrientedAppointmentItemStyleSelector>

     

    Thanks

    Marc

  2. Answer
    Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 23 Sep 2015 Link to this post

    Hi Marc,

    In order to achieve the desired appearance of the selected Appointment you need to modify the default AppointmentItemVerticalControlTemplate (from the provided code-snippet we noticed you need to modify the VerticalStyle of the AppointmentItem).

    By setting the desired color for the  AppointmentItemBackground_Selected LinearGradientBrush the needed appearance will be achieved.

    We have created a sample project that demonstrates that and you could run and evaluate it - please, notice Implicit Styles were used.

    Hopes this helps.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top