Last active
August 29, 2015 14:08
-
-
Save jamesmundy/a2678c7d6577c92aba3d to your computer and use it in GitHub Desktop.
Windows 8 Tile Control XAML: https://medium.com/p/84454669b005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl | |
x:Class="W8TileControl.TileControl" | |
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" | |
d:DesignHeight="300" | |
d:DesignWidth="300"> | |
<UserControl.Resources> | |
<Storyboard x:Name="FlipIn"> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid"> | |
<DiscreteObjectKeyFrame KeyTime="0"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Collapsed</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:0.5"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:1"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid1"> | |
<DiscreteObjectKeyFrame KeyTime="0"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:0.5"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Collapsed</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:1"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Collapsed</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
</ObjectAnimationUsingKeyFrames> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="grid1"> | |
<EasingDoubleKeyFrame KeyTime="0" Value="0"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-90"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-180"/> | |
</DoubleAnimationUsingKeyFrames> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="grid"> | |
<EasingDoubleKeyFrame KeyTime="0" Value="-180"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/> | |
</DoubleAnimationUsingKeyFrames> | |
</Storyboard> | |
<Storyboard x:Name="FlipOut"> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid"> | |
<DiscreteObjectKeyFrame KeyTime="0"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:0.5"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Collapsed</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:1"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid1"> | |
<DiscreteObjectKeyFrame KeyTime="0"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Collapsed</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:0.5"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
<DiscreteObjectKeyFrame KeyTime="0:0:1"> | |
<DiscreteObjectKeyFrame.Value> | |
<Visibility>Visible</Visibility> | |
</DiscreteObjectKeyFrame.Value> | |
</DiscreteObjectKeyFrame> | |
</ObjectAnimationUsingKeyFrames> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="grid1"> | |
<EasingDoubleKeyFrame KeyTime="0" Value="-180"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/> | |
</DoubleAnimationUsingKeyFrames> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="grid"> | |
<EasingDoubleKeyFrame KeyTime="0" Value="0"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-90"/> | |
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-180"/> | |
</DoubleAnimationUsingKeyFrames> | |
</Storyboard> | |
</UserControl.Resources> | |
<Grid> | |
<Grid x:Name="grid" Background="#FF00FB22"> | |
<Grid.Projection> | |
<PlaneProjection RotationX="-180"/> | |
</Grid.Projection> | |
<Image x:Name="Image2" Stretch="UniformToFill"/> | |
</Grid> | |
<Grid x:Name="grid1" Background="Red"> | |
<Grid.Projection> | |
<PlaneProjection/> | |
</Grid.Projection> | |
<Image x:Name="Image1" Stretch="UniformToFill"/> | |
</Grid> | |
</Grid> | |
</UserControl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment