RadTreeViewItem highlight colour

3 posts, 0 answers
  1. Ammaar
    Ammaar avatar
    12 posts
    Member since:
    Dec 2010

    Posted 21 Oct 2011 Link to this post

    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. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 26 Oct 2011 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Yogesh
    Yogesh avatar
    6 posts
    Member since:
    May 2011

    Posted 29 Dec 2011 Link to this post

    Hey!
    Thanks, This made my day.
    Regards
    Yogesh
Back to Top