I have this problem:
I have an user control which contains: 1) A DataGrid
<DataGrid x:Name="GrdHistoricalInformation"
Style="{StaticResource BaseDataGridStyle}"
SelectedIndex="0"
ItemsSource="{Binding BarList}"
HorizontalScrollBarVisibility="Auto"
BorderThickness="1"
BorderBrush="Black"
HorizontalAlignment="Stretch"
CanUserSortColumns="False"
DockPanel.Dock="Top"
ColumnHeaderHeight="50"
SelectedItem="{Binding SelectedBar, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
2) An user control with some radiobuttons that have a command that fires on my viewmodel.
My problem is that when i select a row and then i press a radiobutton, the selected item on the grid loses the "highlight" (Even though I have the selected item binded correctly in my viewmodel)
Here I select a row:
Then when i press the RB loses focus
And i am not able to use events on the solution because of the mvvm pattern.
Any suggestion or help will be very much appretiated! Thanks in advance.
EDITED:
Tried with this style:
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="#660066"/>
</MultiTrigger>
</Style.Triggers>
But still not working.