Ejemplo n.º 1
0
        //淡入淡出
        static void AssetActionFade(AssetActionInfo assetAction, ToolboxItem item, double fromValue, double toValue)
        {
            DoubleAnimation doubleAnimation = new DoubleAnimation(toValue, new Duration(GetSpan(assetAction.Time)));

            item.IsEnabled             = false;
            doubleAnimation.Completed += (sender, e) =>
            {
                item.IsEnabled = true;
            };
            item.BeginAnimation(DesignerItem.OpacityProperty, doubleAnimation, HandoffBehavior.SnapshotAndReplace);
        }
Ejemplo n.º 2
0
        //飞入
        static void AssetActionMove(AssetActionInfo assetAction, ToolboxItem item, double fromValue, double toValue)
        {
            DoubleAnimation doubleAnimation = new DoubleAnimation(toValue, new Duration(GetSpan(assetAction.Time)));

            item.IsEnabled             = false;
            doubleAnimation.Completed += (sender, e) =>
            {
                item.IsEnabled = true;
            };
            item.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
        }