Q:

How do I set a grid as focues using a IsMouseOver trigger?

I am trying to bring focus to a Grid element that is the base of an xaml file when I hover over it with the mouse.  I have the following code and it is not currently setting the focus.
<Grid x:Class="MyApp.MyClass"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300"
         d:DataContext="{Binding Source={d:DesignInstance Type=trackPlot:MyViewModel}}"
         Focusable="True" 
         Name="MainGrid">
    <Grid.Style>
        <Style TargetType="{x:Type Grid}">
            <Style.Triggers>
                <Trigger Property="IsFocused" Value="False">
                    <Setter Property="Background" Value="Transparent"/>
                </Trigger>
                <Trigger Property="IsFocused" Value="True">
                    <Setter Property="Background" Value="Green"/>
                </Trigger>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=MainGrid}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Grid.Style>
    ....Grid Contents here....
</Grid>

The first two triggers are just there to make it obvious that the Grid has been focused on and work if I tab onto the grid.  The third trigger is where I am trying to set the focus and it is not functioning.

A:

In your case I suggest you to use RelativeSource.Self in FocusedElement binding :
<Trigger Property="IsMouseOver" Value="True">
    <Setter Property="FocusManager.FocusedElement" Value="{Binding RelativeSource={RelativeSource Self}}"/>
</Trigger>

I think the reason is that binding expression searches element by element name without check target element name itself.
I can also provide my full example if its needed.

