<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Animation">
  <Window.Resources>
    <Style TargetType="{x:Type Button}">
      <Setter Property="VerticalAlignment" Value="Bottom"/>
      <Setter Property="LayoutTransform">
        <Setter.Value>
          <ScaleTransform/>
        </Setter.Value>
      </Setter>
      <Style.Triggers>
        <EventTrigger RoutedEvent="Button.MouseEnter">
          <EventTrigger.Actions>
            <BeginStoryboard>
              <Storyboard>
                <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX"
                To="2" Duration="0:0:0.25"/>
                <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY"
                To="2" Duration="0:0:0.25"/>
              </Storyboard>
            </BeginStoryboard>
          </EventTrigger.Actions>
        </EventTrigger>
        <EventTrigger RoutedEvent="Button.MouseLeave">
          <EventTrigger.Actions>
            <BeginStoryboard>
              <Storyboard>
                <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX"
                To="1" Duration="0:0:0.25"/>
                <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY"
                To="1" Duration="0:0:0.25"/>
              </Storyboard>
            </BeginStoryboard>
          </EventTrigger.Actions>
        </EventTrigger>
      </Style.Triggers>
    </Style>
  </Window.Resources>
  <StackPanel Orientation="Horizontal">
    <Button>1</Button>
    <Button>2</Button>
    <Button>3</Button>
    <Button>4</Button>
    <Button>5</Button>
    <Button>6</Button>
    <Button>7</Button>
    <Button>8</Button>
  </StackPanel>
</Window>