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

Change the color of the selected item

1 Answer 47 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 28 Apr 2016, 03:03 PM

Hello;

 

I am using Telerik ScheduleView in my projet.

We developped a planning in order to assign responsible any time.

We would like to update the orange color of the selected item (see screenshot1) and set something like in demo (transparent grey ==> Screenshot2).

How can we perform that ?

 

Thanks for your feedback

 

1 Answer, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 03 May 2016, 07:09 AM
Hello Sam,

The gray effect comes from the Border named SelectionVisual inside AppointmentItemHorizontalControlTemplate and AppointmentItemVerticalControlTemplate for Windows8 theme. It looks like:
<Border x:Name="SelectionVisual" Visibility="Collapsed" Background="{telerik:Windows8Resource ResourceKey=StrongBrush}" Opacity="0.3"/>

And when the appointment is selected you need to change through visual state the visibility to be "Visible".
<VisualStateGroup x:Name="SelectionStates">
                   <VisualState x:Name="Unselected"/>
                   <VisualState x:Name="Selected">
                       <Storyboard>
                           <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="SelectionVisual" Storyboard.TargetProperty="Visibility">
                               <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                   <DiscreteObjectKeyFrame.Value>
                                       <Visibility>Visible</Visibility>
                                   </DiscreteObjectKeyFrame.Value>
                               </DiscreteObjectKeyFrame>
                           </ObjectAnimationUsingKeyFrames>
                       </Storyboard>
                   </VisualState>
               </VisualStateGroup>


I hope this helps.


Regards,
Masha
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
ScheduleView
Asked by
Sam
Top achievements
Rank 1
Answers by
Masha
Telerik team
Share this question
or