<Window x:Class="ReplaceRowIndicator.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
        xmlns:my="clr-namespace:ReplaceRowIndicator"
        Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
        <my:MyViewModel x:Key="MyViewModel"/>
        <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="SelectionStates">
                        <VisualState x:Name="Unselected"/>
                        <VisualState x:Name="SelectedUnfocused">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected_Unfocused" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Collapsed</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="Selected">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0">
                                        <DiscreteObjectKeyFrame.Value>
                                            <Visibility>Visible</Visibility>
                                        </DiscreteObjectKeyFrame.Value>
                                    </DiscreteObjectKeyFrame>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <grid:SelectiveScrollingGrid x:Name="grid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border x:Name="Background_Main"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Background="{TemplateBinding Background}"
                        Margin="{TemplateBinding Margin}"
                        Padding="{TemplateBinding Padding}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                        BorderBrush="{TemplateBinding BorderBrush}"/>
                    <grid:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" DetailsProvider="{TemplateBinding DetailsProvider}" Margin="0 -1 0 0"/>
                    <ContentPresenter x:Name="PART_HierarchyChildPresenter"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        Grid.Row="2"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                        Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                    <Border
                        Grid.RowSpan="3"
                        Width="29"
                        Background="{TemplateBinding Background}"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                    <Border x:Name="PART_RowBorder"
                        Grid.ColumnSpan="4"
                        Grid.RowSpan="3"
                        BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                        BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"/>
                    <Border x:Name="Background_Over" Grid.ColumnSpan="4" Background="{TemplateBinding MouseOverBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                    <Border x:Name="Background_Selected_Unfocused"
                        Grid.ColumnSpan="4"
                        Background="{telerik1:CrystalResource ResourceKey=ComplementaryBrush}"
                        Visibility="Collapsed"
                        Margin="0 0 0 1"/>
                    <Border x:Name="Background_Selected" Grid.ColumnSpan="4" Background="{TemplateBinding SelectedBackground}" Visibility="Collapsed" Margin="0 0 0 1"/>
                    <Border x:Name="PART_IndicatorPresenter"
                        Grid.RowSpan="3"
                        Width="29"
                        VerticalAlignment="Stretch"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 0 1 0"
                        Background="Transparent"
                        Visibility="{TemplateBinding RowIndicatorVisibility}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                        <Grid>
                            <Grid x:Name="GridIndicatorPresenter">
                                <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                    <!--<telerik:RadGlyph x:Name="IconRight"
                                        Foreground="{telerik1:CrystalResource ResourceKey=IconBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphArrowChevronRight}"/>-->
                                    <Rectangle x:Name="IconRight" Fill="{telerik1:CrystalResource ResourceKey=IconBrush}" Width="20" Height="20" />
                                </Grid>
                                <Grid x:Name="EditIndicator" Width="16" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                                    <telerik:RadGlyph x:Name="EditIndicatorIcon"
                                        Foreground="{telerik1:CrystalResource ResourceKey=IconBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                                </Grid>
                                <Grid x:Name="InvalidEditableIndicator" Visibility="Collapsed" Background="Transparent">
                                    <telerik:RadGlyph
                                        Foreground="{telerik1:CrystalResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphComment}"/>
                                    <ToolTipService.ToolTip>
                                        <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                                    </ToolTipService.ToolTip>
                                </Grid>
                                <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Width="16" Height="16" VerticalAlignment="Center" Visibility="Collapsed">
                                    <telerik:RadGlyph
                                        Foreground="{telerik1:CrystalResource ResourceKey=ValidationBrush}"
                                        FontSize="16"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Glyph="{StaticResource GlyphWarning}"/>
                                    <ToolTipService.ToolTip>
                                        <ToolTip Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewValidationToolTipTemplate}"/>
                                    </ToolTipService.ToolTip>
                                </Grid>
                                <Thumb x:Name="PART_RowResizer" Style="{StaticResource RowGripperStyle}"/>
                            </Grid>
                            <grid:GridViewPinButton x:Name="PinnedRowPresenter" IsPinned="{Binding IsPinned, RelativeSource={RelativeSource TemplatedParent}}" Visibility="Collapsed"/>
                        </Grid>
                    </Border>
                    <grid:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3"/>
                    <controls:GridViewToggleButton x:Name="PART_HierarchyExpandButton"
                        Grid.Column="2"
                        Margin="0"
                        IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                        IsHitTestVisible="{TemplateBinding IsExpandable}"
                        Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                        IsTabStop="{TemplateBinding IsTabStop}"/>
                    <grid:IndentPresenter x:Name="PART_IndentPresenter"
                        Margin="0 0 0 1"
                        Grid.Column="1"
                        Grid.RowSpan="4"
                        IndentLevel="{TemplateBinding IndentLevel}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                </grid:SelectiveScrollingGrid>
            </Border>
            <ControlTemplate.Triggers>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition SourceName="Background_Selected" Property="Visibility" Value="Visible"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="EditIndicatorIcon" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="IconRight" Property="Fill" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition SourceName="Background_Selected" Property="Visibility" Value="Visible"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="PinnedRowPresenter" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition SourceName="Background_Selected" Property="Visibility" Value="Visible"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="PART_HierarchyExpandButton" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition SourceName="Background_Selected" Property="Visibility" Value="Visible"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsPressed" Value="False"/>
                        <Condition Property="IsValid" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="PART_HierarchyExpandButton" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=ValidationBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsMouseOver" Value="True"/>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition Property="IsValid" Value="True"/>
                        <Condition Property="IsSelected" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="Background_Over" Property="Visibility" Value="Visible"/>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                    <Setter TargetName="IconRight" Property="Fill" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsMouseOver" Value="True"/>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition Property="IsValid" Value="True"/>
                        <Condition Property="IsSelected" Value="False"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PART_HierarchyExpandButton" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="PART_HierarchyExpandButton" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsMouseOver" Value="True"/>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                        <Condition Property="IsValid" Value="True"/>
                        <Condition Property="IsSelected" Value="False"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="PinnedRowPresenter" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerInvertedBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsValid" Value="False"/>
                        <Condition Property="IsInEditMode" Value="False"/>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=ValidationBrush}"/>
                    <Setter TargetName="ErrorIndicator" Property="Visibility" Value="Visible"/>
                    <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                    <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                    <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsValid" Value="False"/>
                        <Condition Property="IsInEditMode" Value="True"/>
                        <Condition Property="DisplayVisualCues" Value="True"/>
                    </MultiTrigger.Conditions>
                    <Setter Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=ValidationBrush}"/>
                    <Setter TargetName="InvalidEditableIndicator" Property="Visibility" Value="Visible"/>
                    <Setter TargetName="Background_Selected_Unfocused" Property="Background" Value="{x:Null}"/>
                    <Setter TargetName="Background_Selected" Property="Background" Value="{x:Null}"/>
                    <Setter TargetName="Background_Main" Property="Visibility" Value="Collapsed"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsValid" Value="True"/>
                        <Condition Property="IsInEditMode" Value="True"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="EditIndicator" Property="Visibility" Value="Visible"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsValid" Value="True"/>
                        <Condition Property="IsCurrent" Value="True"/>
                        <Condition Property="IsInEditMode" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
                </MultiTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsEnabled, ElementName=PinnedRowPresenter}" Value="True"/>
                        <Condition Binding="{Binding IsMouseOver, ElementName=PART_IndicatorPresenter}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                    <Setter TargetName="GridIndicatorPresenter" Property="Visibility" Value="Collapsed"/>
                    <Setter TargetName="PinnedRowPresenter" Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsPinned, RelativeSource={RelativeSource Self}}" Value="True"/>
                        <Condition Binding="{Binding IsEnabled, ElementName=PinnedRowPresenter}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                    <Setter TargetName="GridIndicatorPresenter" Property="Visibility" Value="Collapsed"/>
                    <Setter TargetName="PinnedRowPresenter" Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
                <Trigger Property="IsPinned" Value="True">
                    <Setter Property="Background" Value="{telerik1:CrystalResource ResourceKey=AlternativeBasicBrush}"/>
                </Trigger>
                <Trigger Property="HorizontalGridLinesWidth" Value="0">
                    <Setter TargetName="PART_DetailsPresenter" Property="Margin" Value="0"/>
                    <Setter TargetName="Background_Over" Property="Margin" Value="0"/>
                    <Setter TargetName="Background_Selected_Unfocused" Property="Margin" Value="0"/>
                    <Setter TargetName="Background_Selected" Property="Margin" Value="0"/>
                    <Setter TargetName="PART_IndentPresenter" Property="Margin" Value="0"/>
                </Trigger>
                <Trigger Property="DetailsVisibility" Value="Visible">
                    <Setter TargetName="IconRight" Property="Fill" Value="{telerik1:CrystalResource ResourceKey=IconBrush}"/>
                    <Setter TargetName="EditIndicatorIcon" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=IconBrush}"/>
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="DetailsVisibility" Value="Visible"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="PinnedRowPresenter" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="HasHierarchy" Value="True"/>
                        <Condition Property="IsExpanded" Value="True"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="IconRight" Property="Fill" Value="{telerik1:CrystalResource ResourceKey=IconBrush}"/>
                    <Setter TargetName="EditIndicatorIcon" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=IconBrush}"/>
                </MultiTrigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="HasHierarchy" Value="True"/>
                        <Condition Property="IsExpanded" Value="True"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsMouseOver" Value="False"/>
                        <Condition SourceName="PinnedRowPresenter" Property="IsPressed" Value="False"/>
                    </MultiTrigger.Conditions>
                    <Setter TargetName="PinnedRowPresenter" Property="Foreground" Value="{telerik1:CrystalResource ResourceKey=MarkerBrush}"/>
                </MultiTrigger>
                <Trigger Property="IsCurrent" Value="True">
                    <Setter TargetName="Background_Selected" Property="Background" Value="LightBlue" />
                    <Setter TargetName="Background_Selected" Property="Visibility" Value="Visible" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style BasedOn="{StaticResource GridViewRowStyle}" TargetType="grid:GridViewRow">
            <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
        </Style>
    </Window.Resources>
	<StackPanel DataContext="{StaticResource MyViewModel}">
        <telerik:RadMultiColumnComboBox SelectedItem="{Binding SelectedItem}">
            <telerik:RadMultiColumnComboBox.ItemsSourceProvider>
                <telerik:GridViewItemsSourceProvider ItemsSource="{Binding Players}" />
            </telerik:RadMultiColumnComboBox.ItemsSourceProvider>
        </telerik:RadMultiColumnComboBox>
	</StackPanel>
</Window>
