Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I guess that you <em>really</em> verified that the <code>SelectedItem</code> has changed (you could set the <code>Binding</code> Mode to <code>TwoWay</code> temporarily to see if it works the other way round, by clicking the row you should see the highlight and <code>SelectedItem</code>'s <code>set</code>-method executed). If yes, verify that you <em>really</em> exactly match the Property Name on <code>PropertyChanged</code> method invoke. Since you're not typesafe here, you might have made a spelling error. If no, check if your Databinding Attribute is set correctly. Another idea is that you might have changed the <code>DataGrid</code>'s styles or template and now you are missing some of the <strong>Visual States</strong>. The <code>DataGridRow</code> can be styled using a style template. You have three selected states, called <code>UnfocusedSelected</code> (probably the right one), <code>NormalSelected</code> and <code>MouseOverSelected</code>.</p> <p>You could try to make your own Visual State by using this template:</p> <pre><code>&lt;Style TargetType="local:DataGridRow"&gt; &lt;Setter Property="IsTabStop" Value="False" /&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="local:DataGridRow"&gt; &lt;localprimitives:DataGridFrozenGrid Name="Root"&gt; &lt;vsm:VisualStateManager.VisualStateGroups&gt; &lt;vsm:VisualStateGroup x:Name="CommonStates"&gt; &lt;vsm:VisualState x:Name="Normal"/&gt; &lt;vsm:VisualState x:Name="NormalAlternatingRow"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;vsm:VisualState x:Name="MouseOver"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".5"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;vsm:VisualState x:Name="NormalSelected"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;vsm:VisualState x:Name="MouseOverSelected"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;vsm:VisualState x:Name="UnfocusedSelected"&gt; &lt;Storyboard&gt; &lt;DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/&gt; &lt;ColorAnimation Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" To="#FFE1E7EC"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;/vsm:VisualStateGroup&gt; &lt;vsm:VisualStateGroup x:Name="ValidationStates"&gt; &lt;vsm:VisualState x:Name="Valid"/&gt; &lt;vsm:VisualState x:Name="Invalid"&gt; &lt;Storyboard&gt; &lt;ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Visibility"&gt; &lt;DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/&gt; &lt;/ObjectAnimationUsingKeyFrames&gt; &lt;DoubleAnimation Storyboard.TargetName="InvalidVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/&gt; &lt;/Storyboard&gt; &lt;/vsm:VisualState&gt; &lt;/vsm:VisualStateGroup&gt; &lt;/vsm:VisualStateManager.VisualStateGroups&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.Resources&gt; &lt;Storyboard x:Key="DetailsVisibleTransition"&gt; &lt;DoubleAnimation Storyboard.TargetName="DetailsPresenter" Storyboard.TargetProperty="ContentHeight" Duration="00:00:0.1" /&gt; &lt;/Storyboard&gt; &lt;/Grid.Resources&gt; &lt;Rectangle x:Name="BackgroundRectangle" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="#FFBADDE9"/&gt; &lt;Rectangle x:Name="InvalidVisualElement" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="#FFF7D8DB"/&gt; &lt;localprimitives:DataGridRowHeader Grid.RowSpan="3" Name="RowHeader" localprimitives:DataGridFrozenGrid.IsFrozen="True" /&gt; &lt;localprimitives:DataGridCellsPresenter Grid.Column="1" Name="CellsPresenter" localprimitives:DataGridFrozenGrid.IsFrozen="True" /&gt; &lt;localprimitives:DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" Name="DetailsPresenter" /&gt; &lt;Rectangle Grid.Row="2" Grid.Column="1" Name="BottomGridLine" HorizontalAlignment="Stretch" Height="1" /&gt; &lt;/localprimitives:DataGridFrozenGrid&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>This is a copy-paste from a good <a href="http://msdn.microsoft.com/en-us/library/cc278066%28v=VS.95%29.aspx" rel="nofollow noreferrer">MSDN Article</a> on customizing the DataGrid Styles. You could, for example, modify the <code>UnfocusedSelected</code> part of the template and see if you see any change when, for example, adding a red border around it or something.</p> <p>Maybe it's worth a try. I hope that you know how to apply own styles. If not, here is another <a href="http://msdn.microsoft.com/en-us/library/cc189093(v=VS.95).aspx" rel="nofollow noreferrer">MSDN Resource</a>.</p> <p>I know, these are just tips, but maybe helpful at last.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload