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

RadTreeViewItem highlight colour

2 Answers 290 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ammaar
Top achievements
Rank 1
Ammaar asked on 21 Oct 2011, 01:11 PM
Hello,

Please see the attached screenshots of my RadTreeViewItems. As you can see, when the tree has lost focus, the highlight colour of the SelectedItem becomes almost impossible to distinguish from an unselected item and this is causing usability issues with our users. I would like to know how to make the highlight colour not change when the tree has lost focus.

Thanks,

Ammaar.

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 26 Oct 2011, 11:01 AM
Hi Ammaar,

 I prepared a project for you where the ItemContainerStyle of the RadTreeView is edited (this is actually the RadTreeViewItem's Style).Basically I set the Background of the SelectionVisual Border to the SelectionUnfocusedVisual Border. Please let us know if this satisfies you.

<Border x:Name="SelectionUnfocusedVisual" BorderBrush="#FFDBDBDB" BorderThickness="1" Grid.ColumnSpan="6" Grid.Column="2" CornerRadius="1" Visibility="Collapsed">
                                <Border BorderBrush="Transparent" BorderThickness="1" CornerRadius="0">
                                    <Border.Background>
                                        <!--<LinearGradientBrush EndPoint="0,1">
                                            <GradientStop Color="#FFF8F6F9" Offset="0"/>
                                            <GradientStop Color="#FFF0F0F0" Offset="1"/>
                                        </LinearGradientBrush>-->
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFCE79F" Offset="1" />
                                            <GradientStop Color="#FFFDD3A8" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Border>
                            <Border x:Name="SelectionVisual" BorderBrush="#FFFFC92B" BorderThickness="1" Grid.ColumnSpan="6" Grid.Column="2" CornerRadius="1" Visibility="Collapsed">
                                <Border BorderBrush="White" BorderThickness="1" CornerRadius="0">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFCE79F" Offset="1"/>
                                            <GradientStop Color="#FFFDD3A8"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Border>

Regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Yogesh
Top achievements
Rank 1
answered on 29 Dec 2011, 11:16 AM
Hey!
Thanks, This made my day.
Regards
Yogesh
Tags
TreeView
Asked by
Ammaar
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Yogesh
Top achievements
Rank 1
Share this question
or