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

Programatically change selector color

2 Answers 58 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 18 Jul 2012, 10:27 PM
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 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 19 Jul 2012, 09:13 AM
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.

0
Tsvetie
Telerik team
answered on 19 Jul 2012, 10:20 AM
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.

Tags
TimeBar
Asked by
Eric
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or