Valentin.Stoychev

Please find attached a project that contains the themes for all the controls. Feel free to modify the TreeView themes as you need. Unfortunately you need to do that manually due to current problems with the Blend support.

In order to change the SelectionVisual you need to edit the $MyCustomTheme/Themes/TreeView.xaml file and to change the "SelectionVisual" element that is on line 533.

Please let us now if you need more help on that.

All the best,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Ivan

As our colleague Valentin has already sent all the code, I will just explain what you should do to reach the desired result. Please follow the plan explained bellow:

1. First let us change the application's content - copy the attached RadWindowBlend.xaml file over the existing one in TelerikThemingApplication project - there is a simple Tree with some items.

2. I highly advise you to preview the Common.xaml file from MyCustomTheme project - this is the place where we hold definitions for all common brushes used in our controls. You can edit these brushes in order to recolor RadControls - this approach is addressed in Tweaking the Theme colors article.

3. Preview the TreeView.xaml file (from the Valentin's archive). Especially look at following places:
- rows 7 and 31 where the SelectedBrush brush is preloaded as a TreeView resource:

- the row 533 where the usage of the SelectedBrush brush is scripted as main part of SelectionVisual element:

4. One easy way to change the look of selected tree item is to change the SelectedBrush brush in TreeView.xaml file - just clean the row 31 and define a new SelectedBrush brush. In the attached archive in the Step4 folder you can find such a file - just copy it over the existing one in the MyCustomTheme project and preview the result.

5. The second way is to change the SelectionVisual element directly at row 533 (as it is done in file located in the Step5 folder from the attached archive).

6. And finally you can change the TreeViewItem's template completely in order to conform the task you are working on. For example you can preview the code inside the Lookless TreeView example.

Paul, please give it a try and let us know if there are other questions.

Regards,
Ivan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.