<Window x: Class = "StoryBoard. MainWindow"
Xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
Title = "MainWindow" Height = "350" Width = "525" Foreground = "{x: null} "WindowStyle =" None "ResizeMode =" NoResize "AllowsTransparency =" True "Background =" {x: Null} "Topmost =" True ">
<Window. Resources>
<Storyboard x: Key = "fanzhuan">
<! -- Flip position: 0.5; 0.5 indicates point flip -->
<PointAnimationUsingKeyFrames Storyboard. TargetProperty = "(UIElement. RenderTransformOrigin)" Storyboard. TargetName = "grid">
<EasingPointKeyFrame KeyTime = "0" Value = "0.5, 0.5"/>
</PointAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard. TargetProperty = "(UIElement. RenderTransform). (TransformGroup. Children) [0]. (ScaleTransform. ScaleX)" Storyboard. TargetName = "grid">
<! -- KeyTime indicates the time interval, and value indicates where to flip.-1 indicates the opposite.-0.8 indicates the side. -->
<EasingDoubleKeyFrame KeyTime = "0" Value = "-1">
<EasingDoubleKeyFrame. EasingFunction>
<CubicEase EasingMode = "EaseIn"/>
</EasingDoubleKeyFrame. EasingFunction>
</EasingDoubleKeyFrame>
<! -- Indicates the time interval at which timespan is completely flipped -->
<EasingDoubleKeyFrame KeyTime = "0: 0: 1" Value = "1">
<EasingDoubleKeyFrame. EasingFunction>
<CubicEase EasingMode = "EaseOut"/>
</EasingDoubleKeyFrame. EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window. Resources>
<Window. Triggers>
<EventTrigger RoutedEvent = "FrameworkElement. Loaded">
<BeginStoryboard Storyboard = "{StaticResource fanzhuan}"/>
</EventTrigger>
</Window. Triggers>
<Grid x: Name = "grid">
<! -- You must be able to flip properties -->
<Grid. RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Grid. RenderTransform>
<Grid. Background>
<ImageBrush Stretch = "UniformToFill" ImageSource = "Resources/6.jpg"/>
</Grid. Background>
<Button Content = "Button" Name = "btn1" HorizontalAlignment = "Left" Margin = "338,153," VerticalAlignment = "Top" Width = "75">
<Button. Triggers>
<EventTrigger RoutedEvent = "Button. Click">
<BeginStoryboard Storyboard = "{StaticResource fanzhuan}"/>
</EventTrigger>
</Button. Triggers>
</Button>
<Button Content = "Button" Click = "Button_Click" HorizontalAlignment = "Left" Margin = "164,218," VerticalAlignment = "Top" Width = "75"/>
</Grid>
</Window>