This is a migrated thread and some comments may be shown as answers.
Changing color of TreeView Item
3 Answers 56 Views
This is a migrated thread and some comments may be shown as answers.
Kamlesh
Top achievements
Rank 1
Kamlesh asked on 02 Dec 2008, 04:29 PM
You are displaying default color on the mouse over of the treeview. Can i change the color when mouse over of treeview.

Thanks
Kamlesh

3 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 03 Dec 2008, 12:11 PM
Hello Kamlesh,

Thank you for your interest in RadControls for Silverlight.

To achieve the result you are looking for you should edit the Theme of the RadTreeView control. Unfortunately, you need to do this manually due to current issues with the Blend support. Tweaking the Theme colors is a nice article related to themes modifying.

The case analogous to yours is explained thoroughly in SelectionVisual forum thread - indeed I just slightly modified the TreeView.xaml file in order to get hovering look different. In the attached archive you can find a modified version of the Theming project where techniques described bellow are applied:
  • the row 33 - the insertion point of the MouseOverBrush brush - if you redefine it you should remove it from this place. Note I removed it in the modified file.
  • the rows between 42 and 49 (only in the modified file) - here I redefined the MouseOverBrush brush.
  • beginning from the row 537 in the original file and 545 in the modified one - here we scripted the visual representation of the tree item hovering effect.
Please give it a try and let me know if there are other questions.

All the best,
Ivan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Meliton Tienda
Top achievements
Rank 1
answered on 12 Jan 2010, 10:45 PM
Hello. i have a question.

It´s possible define the theme="Vista" from c# code.

in Xaml it´s
telerik:StyleManager.Theme="Vista"  but i´m trying to do this from codebehide

any suggestion??
0
Valentin.Stoychev
Telerik team
answered on 13 Jan 2010, 06:47 AM
Hello Meliton Tienda,

Please check this help article:
http://www.telerik.com/help/silverlight/common-styling-apperance-setting-theme.html

Regards,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
Kamlesh
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Meliton Tienda
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or