Selected Item Background Color with Implicit Styles

Steven

I'm trying to remove the background color for a selected RadTreeViewItem and have so far not had much luck. I have tried following the documentation to create a copy of the ItemContainerStyle, but none of the brushes (ControlSubItem_ etc) seem to be picked up - in fact, I don't seem to get any template at all.

What is the easiest way to remove this highlight and is there any differences when using the implicit styles?

Cheers,

Steven

Evgenia

Have you tried to edit the ControlTemplate of the RadTreeViewItem in ExpressionBlend following the approach described here? In the RadTreeViewItem template there are MouseOverVisual andSelectedVisual elements, that define the borders displayed during the Selected and MouseOvervisual states of the control.
When you edit the ControlTemplate of the RadTreeViewItem in Blend, all related resources should be generated as well, including the following brushes:

Since the MouseOver/Selected background colors are defined by theControlSubItem_Background_MouseOver and ControlSubItem_Background_SelectedLinearGradientBrushes, if you want to keep the borders and remove only the background colors, you can replace these brushes with SolidColorBrushes with Transparent color:

<SolidColorBrush x:Key="ControlSubItem_Background_MouseOver"

Color="Transparent" />

....

<SolidColorBrush x:Key="ControlSubItem_Background_Selected"

Color="Transparent" />

I have also attached a sample project illustrating this approach.

Of course this can be done via our Implicit Styles mechanism - for the purpose you'll need to edit the ControlTemplate of RadTreeViewItem in Telerik.Windows.Controls.Navigation.xaml file and merge the modified file in your App.xaml resources. For the purpose please follow this help topic. It is up to you to pick the most suitable approach for you - whether to modify the Color via Blend or via Implicit styles mechanism.

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 or appropriate markings.