• 大小: 0.63M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: wpf  示例  效果  wp  

资源简介

gif录制质量差,下载代码查看效果。


就3个函数,可进行多种配置,实现不同效果。

可应用于连续浏览组件(图像等)、tab切换、弹出对话框等效果。
更多设计模式可参考html5动画(tab、窗体、幻灯播放等):http://www.htmleaf.com/html5/html5donghua/

代码改编自微软示例代码库
// Copyright © Microsoft Corporation.  All Rights Reserved.
// This code released under the terms of the

// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)


/// </summary>
    /// <param name="translation_control">需动画的组件</param>
    /// <param name="mode">模式:0-弹性,2-惯性</param>
    /// <param name="orientation">方向:0-正向,1-反向</param>
    /// <param name="axis">轴:0-左右,1-上下</param>
    /// <param name="delay">延时</param>
    /// <param name="_begin">开始动画位置</param>
    /// <param name="_end">结束动画位置</param>
    /// <param name="amplitude">振幅</param>
    /// <param name="suppression">硬度</param>
    public void Translation(FrameworkElement translation_control, int mode, int orientation, int axis, double delay, double _begin, double _end, double amplitude = 8, double suppression = 3)



    /// </summary>
    /// <param name="main">在哪个Grid内</param>
    /// <param name="width">组件宽度</param>
    /// <param name="height">组件高度</param>
    /// <param name="direction">方向:0-横向,1-纵向</param>
    /// <param name="rotate_control">组件</param>
    /// <param name="begin_angel">起始角度</param>
    /// <param name="timeDelay">延时</param>
    public CushionRotate(Grid main, double width, double height, int direction, UserControl rotate_control, double begin_angel, double timeDelay)

    /// </summary>
    /// <param name="mode">模式:0-弹性,1-惯性</param>
    /// <param name="amplitude">振幅</param>
    /// <param name="suppression">硬度</param>
    public void Rotate(int mode, double amplitude = 8, double suppression = 3)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Demo_T
{
    /// 
    /// App.xaml 的交互逻辑
    /// 

    public partial class App : Application
    {
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     58368  2019-10-11 16:29  Demo_T\.vs\Demo_T\v15\.suo

     文件          0  2019-10-11 08:52  Demo_T\.vs\Demo_T\v15\Server\sqlite3\db.lock

     文件     696320  2019-10-11 16:23  Demo_T\.vs\Demo_T\v15\Server\sqlite3\storage.ide

     文件      32768  2019-10-11 08:52  Demo_T\.vs\Demo_T\v15\Server\sqlite3\storage.ide-shm

     文件    4124152  2019-10-11 16:28  Demo_T\.vs\Demo_T\v15\Server\sqlite3\storage.ide-wal

    ..A..H.     69632  2019-10-11 19:30  Demo_T\.vs\Demo_T\v16\.suo

     文件          0  2019-10-11 18:53  Demo_T\.vs\Demo_T\v16\Server\sqlite3\db.lock

     文件     704512  2019-10-11 19:30  Demo_T\.vs\Demo_T\v16\Server\sqlite3\storage.ide

     文件        189  2019-10-11 08:52  Demo_T\Demo_T\App.config

     文件        366  2019-10-11 08:52  Demo_T\Demo_T\App.xaml

     文件        333  2019-10-11 08:52  Demo_T\Demo_T\App.xaml.cs

     文件     111513  2019-10-11 13:17  Demo_T\Demo_T\background.jpg

     文件     137728  2019-10-11 19:20  Demo_T\Demo_T\bin\Debug\Demo_T.exe

     文件        189  2019-10-11 08:52  Demo_T\Demo_T\bin\Debug\Demo_T.exe.config

     文件      62976  2019-10-11 19:20  Demo_T\Demo_T\bin\Debug\Demo_T.pdb

     文件      88036  2016-06-15 00:00  Demo_T\Demo_T\bin\Debug\英文字体.ttf

     文件      10317  2019-10-10 13:24  Demo_T\Demo_T\ClassLibrary\Cushion.cs

     文件       4325  2019-10-10 19:14  Demo_T\Demo_T\ClassLibrary\CushionRotate.cs

     文件       2217  2019-10-11 12:32  Demo_T\Demo_T\ClassLibrary\CushionTranslation.cs

     文件       4899  2019-10-11 14:08  Demo_T\Demo_T\Demo_T.csproj

     文件        838  2019-10-11 13:28  Demo_T\Demo_T\MainWindow.xaml

     文件       6292  2019-10-11 19:21  Demo_T\Demo_T\MainWindow.xaml.cs

     文件        757  2019-10-11 13:30  Demo_T\Demo_T\MenuFlag.xaml

     文件        651  2019-10-11 10:31  Demo_T\Demo_T\MenuFlag.xaml.cs

     文件       2306  2019-10-11 08:52  Demo_T\Demo_T\Properties\AssemblyInfo.cs

     文件       2825  2019-10-11 08:52  Demo_T\Demo_T\Properties\Resources.Designer.cs

     文件       5612  2019-10-11 08:52  Demo_T\Demo_T\Properties\Resources.resx

     文件       1093  2019-10-11 08:52  Demo_T\Demo_T\Properties\Settings.Designer.cs

     文件        201  2019-10-11 08:52  Demo_T\Demo_T\Properties\Settings.settings

     文件        647  2019-10-11 15:58  Demo_T\Demo_T\TestFlag.xaml

............此处省略21个文件信息

评论

共有 条评论