<Window x:Class="_5_WPF样式和行为_4关联事件处理程序.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Icon="public/003540AH4M72.jpg" Title="_5_WPF样式和行为_4关联事件处理程序" Height="450" Width="800">
    <Window.Resources>
        <Style x:Key="MouseOverHighLightStyle">
            <EventSetter Event="TextBlock.MouseEnter" Handler="EventSetter_MoueEnter" />
            <EventSetter Event="TextBlock.MouseLeave" Handler="EventSetter_MouseLeave" />
            <Setter Property="TextBlock.Padding" Value="5 " />
        </Style>
    </Window.Resources>
    <StackPanel>
        <TextBlock Style="{StaticResource MouseOverHighLightStyle}">Hover 这个</TextBlock>
    </StackPanel>
</Window>