Пример #1
0
    public static Storyboard FadeHideSb(this FrameworkElement target)
    {
        var sb = new Storyboard();

        sb.AddEasyDoubleAnime(target, 1, 0, 0.3, "opacity");
        return(sb);
    }
Пример #2
0
    public static Storyboard HorizonLessenShowSb(this FrameworkElement target)
    {
        var sb = new Storyboard();

        sb.AddEasyDoubleAnime(target, target.ActualWidth, 0, 0.3, "width");
        sb.AddEasyThicknessAnime(target, new Thickness(2, 0, 2, 0), new Thickness(0), 0.3, "margin");
        return(sb);
    }
Пример #3
0
        /// <summary>
        /// 设置popup显示动画(右键菜单出现动画等)
        /// </summary>
        public static Storyboard LargenShowSb(this FrameworkElement target)
        {
            var sb = new Storyboard();

            sb.AddEasyDoubleAnime(target, 0, 1, 0.3, "opacity");
            //sb.AddEasyDoubleAnime(target, 0.9, 1, 0.3, "scale-x");
            //sb.AddEasyDoubleAnime(target, 0.9, 1, 0.3, "scale-y");
            return(sb);
        }