Change the color of the selected item

2 posts, 0 answers
  1. Sam
    Sam avatar
    10 posts
    Member since:
    Dec 2013

    Posted 28 Apr Link to this post

    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

     

  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 03 May Link to this post

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