Programatically change selector color

3 posts, 0 answers
  1. Eric
    Eric avatar
    48 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

    Hello,

    When I mouse over the selector, the inside of it changes color.  How can I make the selector change to a color of my choice from codebehind (not just when the mouse is over it)?  This will be used to indicate that the selector is actually being used as opposed to just being there and not used.

    Thanks,
    Eric
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Jul 2012 Link to this post

    Hi Eric,

    I am not quite sure I understand the result you are trying to achieve, but basically, you can customize the appearance of the timeline items using the ItemTemplateSelector or the TimelineItemTemplate and TimelineInstantItemTemplate properties.

    The ItemTemplateSelector approach is demonstrated in our Custom ItemTemplate demo. The online demo is for Silverlight, but the code is the same for WPF. If you have installed the dev/trial version, you can open the demos solution in VS and review the code of the demo locally - just go to Start Menu -> Telerik -> RadControls for WPF Q2 2012 -> Open C# Demos in Visual Studio.

    Greetings,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 19 Jul 2012 Link to this post

    Hello Eric,

    Please excuse me for the confusion - the previous reply was for RadTimeline, not for RadTimeBar.

    In case I understand you correctly, you are trying to change the background color of the selection element for its default and hover state. You need to modify the SelectionRange Style, which can be found in Telerik.Windows.Controls.DataVisualization.xaml in order to do this. Please refer to our online documentation for additional information on implicit styles. The following article demonstrates one modification to this style - it can help you get started on the task as well - http://www.telerik.com/help/wpf/radtimebar-hide-selection-range-title.html.

    Kind regards,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top