add GeometryAnimation Demo
This commit is contained in:
1 parent
0e74e5b34e
commit
09f116d4a6
12 files changed
+89
-3
No files matched your search
@@ -63,6 +63,10 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||
## Latest examples
|
## Latest examples
|
||||||
|
|
||||||
|
### GeometryAnimation
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### SplitButton
|
### SplitButton
|
||||||
|
|
||||||

|

|
||||||
@@ -85,12 +89,12 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## History publication
|
||||||
|
|
||||||
### Magnifier
|
### Magnifier
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## History publication
|
|
||||||
|
|
||||||
### Card
|
### Card
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -124,6 +124,8 @@
|
|||||||
|
|
||||||
public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl);
|
public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl);
|
||||||
|
|
||||||
|
public static readonly string GeometryAnimationDemoCtl = nameof(GeometryAnimationDemoCtl);
|
||||||
|
|
||||||
/*-------------------- Styles --------------------*/
|
/*-------------------- Styles --------------------*/
|
||||||
|
|
||||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ var styleList = new List<string>
|
|||||||
};
|
};
|
||||||
var toolList = new List<string>
|
var toolList = new List<string>
|
||||||
{
|
{
|
||||||
"HatchBrushGeneratorDemoCtl"
|
"HatchBrushGeneratorDemoCtl",
|
||||||
|
"GeometryAnimationDemoCtl"
|
||||||
};
|
};
|
||||||
var windowList = new List<string>
|
var windowList = new List<string>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -328,6 +328,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\TreeViewDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\TreeViewDemoCtl.xaml.cs">
|
||||||
<DependentUpon>TreeViewDemoCtl.xaml</DependentUpon>
|
<DependentUpon>TreeViewDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Tools\GeometryAnimationDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>GeometryAnimationDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Tools\HatchBrushGeneratorDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Tools\HatchBrushGeneratorDemoCtl.xaml.cs">
|
||||||
<DependentUpon>HatchBrushGeneratorDemoCtl.xaml</DependentUpon>
|
<DependentUpon>HatchBrushGeneratorDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -821,6 +824,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Tools\GeometryAnimationDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Tools\HatchBrushGeneratorDemoCtl.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Tools\HatchBrushGeneratorDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -843,6 +843,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 变形动画 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Morphing_Animation {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Morphing Animation", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 名称 的本地化字符串。
|
/// 查找类似 名称 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -672,4 +672,7 @@
|
|||||||
<data name="HatchBrushGenerator" xml:space="preserve">
|
<data name="HatchBrushGenerator" xml:space="preserve">
|
||||||
<value>HatchBrushGenerator</value>
|
<value>HatchBrushGenerator</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Morphing Animation" xml:space="preserve">
|
||||||
|
<value>Morphing Animation</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -672,4 +672,7 @@
|
|||||||
<data name="HatchBrushGenerator" xml:space="preserve">
|
<data name="HatchBrushGenerator" xml:space="preserve">
|
||||||
<value>HatchBrushGenerator</value>
|
<value>HatchBrushGenerator</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Morphing Animation" xml:space="preserve">
|
||||||
|
<value>Morphing Animation</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -672,4 +672,7 @@
|
|||||||
<data name="HatchBrushGenerator" xml:space="preserve">
|
<data name="HatchBrushGenerator" xml:space="preserve">
|
||||||
<value>HatchBrushGenerator</value>
|
<value>HatchBrushGenerator</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Morphing Animation" xml:space="preserve">
|
||||||
|
<value>Morphing Animation</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -672,4 +672,7 @@
|
|||||||
<data name="HatchBrushGenerator" xml:space="preserve">
|
<data name="HatchBrushGenerator" xml:space="preserve">
|
||||||
<value>阴影画笔生成器</value>
|
<value>阴影画笔生成器</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Morphing Animation" xml:space="preserve">
|
||||||
|
<value>变形动画</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -503,6 +503,11 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/DataGenerator_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/DataGenerator_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</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>
|
</ListBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</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