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

Change Background color of a selected appointment

1 Answer 256 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Marc-André
Top achievements
Rank 1
Marc-André asked on 18 Sep 2015, 08:32 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 23 Sep 2015, 09:52 AM
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
Tags
ScheduleView
Asked by
Marc-André
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or