<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<Style TargetType="Grid">
<Setter Property="Height" Value="100"/>
<Setter Property="Width" Value="100"/>
<Style.Triggers>
<Trigger Property="Grid.IsMouseOver" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<StackPanel>
<Grid x:Name="grid1" >
<Button Width="100" Height="20" Content="100"/>
</Grid>
<Grid x:Name="grid2">
<Button Content="100" Height="20" Width="100" />
</Grid>
<Grid x:Name="grid3">
<Button Content="100" Width="100" />
</Grid>
<Grid x:Name="grid4">
<Button Content="100" Height="20" Width="100" />
</Grid>
</StackPanel>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<Style TargetType="Grid">
<Setter Property="Height" Value="100"/>
<Setter Property="Width" Value="100"/>
<Style.Triggers>
<Trigger Property="Grid.IsMouseOver" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<StackPanel>
<Grid x:Name="grid1" >
<Button Width="100" Height="20" Content="100"/>
</Grid>
<Grid x:Name="grid2">
<Button Content="100" Height="20" Width="100" />
</Grid>
<Grid x:Name="grid3">
<Button Content="100" Width="100" />
</Grid>
<Grid x:Name="grid4">
<Button Content="100" Height="20" Width="100" />
</Grid>
</StackPanel>
</Window>