How to substitute GridViewIndicatorCell

2 posts, 0 answers
  1. Ludovic
    Ludovic avatar
    5 posts
    Member since:
    Jul 2015

    Posted 06 Aug 2015 Link to this post



    I used this GridViewIndicatorCell style with an old version (2012), and I updated to Q2 2014.

    <ControlTemplate x:Key="GridViewIndicatorCellTemplate" TargetType="grid:GridViewIndicatorCell">
            <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}">
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    Content="{TemplateBinding Content}" />
        <Style x:Key="GridViewIndicatorCellStyle" TargetType="grid:GridViewIndicatorCell">
            <Setter Property="Template" Value="{StaticResource GridViewIndicatorCellTemplate}" />
            <Setter Property="Background" Value="{StaticResource GridView_RowIndicatorCellBackground}" />
            <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
        <Style TargetType="grid:GridViewIndicatorCell" BasedOn="{StaticResource GridViewIndicatorCellStyle}" />


    Then a cell is selected, the background color is more colorful. But now, if my RadGridView lost the focus, the background color of the selected cell disappears. You can see on the attach files the difference between before and now.


    I can see here that as an alternative solution, I can substitute it with a single Border element or any ContentControl. But I don't know how to do, could you help me ?


    Thank you.

  2. Ludovic
    Ludovic avatar
    5 posts
    Member since:
    Jul 2015

    Posted 06 Aug 2015 in reply to Ludovic Link to this post


    I finally solved this issue.

    I changed the code in <VisualState x:Name="SelectedUnfocused">​ of the <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">.



  3. DevCraft R3 2016 release webinar banner
Back to Top