add GeometryAnimation Demo
This commit is contained in:
1 parent
0e74e5b34e
commit
09f116d4a6
12 files changed
+89
-3
No files matched your search
@@ -503,6 +503,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DataGenerator_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GeometryAnimationDemoCtl}" Content="{x:Static langs:Lang.Morphing_Animation}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GeometryAnimationDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
Width="200">
|
||||
<UserControl.Resources>
|
||||
<Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever" AutoReverse="True">
|
||||
<hc:GeometryAnimationUsingKeyFrames Storyboard.TargetProperty="Data" Storyboard.TargetName="PathDemo">
|
||||
<hc:DiscreteGeometryKeyFrame KeyTime="0:0:0.7" Value="{StaticResource FaceBookGeometry}"/>
|
||||
<hc:EasingGeometryKeyFrame KeyTime="0:0:1.2" Value="{StaticResource TwitterGeometry}">
|
||||
<hc:EasingGeometryKeyFrame.EasingFunction>
|
||||
<QuarticEase EasingMode="EaseInOut"/>
|
||||
</hc:EasingGeometryKeyFrame.EasingFunction>
|
||||
</hc:EasingGeometryKeyFrame>
|
||||
</hc:GeometryAnimationUsingKeyFrames>
|
||||
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Fill.(SolidColorBrush.Color)" Storyboard.TargetName="PathDemo">
|
||||
<DiscreteColorKeyFrame KeyTime="0:0:0.7" Value="#3b5998"/>
|
||||
<EasingColorKeyFrame KeyTime="0:0:1.2" Value="#4099ff">
|
||||
<EasingColorKeyFrame.EasingFunction>
|
||||
<QuarticEase EasingMode="EaseInOut"/>
|
||||
</EasingColorKeyFrame.EasingFunction>
|
||||
</EasingColorKeyFrame>
|
||||
<EasingColorKeyFrame KeyTime="0:0:1.9" Value="#4099ff"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</UserControl.Resources>
|
||||
<UserControl.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource StoryboardOnLoaded}"/>
|
||||
</EventTrigger>
|
||||
</UserControl.Triggers>
|
||||
<hc:TransitioningContentControl>
|
||||
<Path Name="PathDemo" Width="100" Height="100" Data="{StaticResource FaceBookGeometry}" Fill="#3b5998"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GeometryAnimationDemoCtl
|
||||
{
|
||||
public GeometryAnimationDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user