Source code Download: http://www.shareidea.net/opensource.htm
Online Demo: http://www.shareidea.net/workflow.htm
Video Tutorials: http://www.shareidea.net/video/sharedesigner/sharedesigner.htm
Six enhancements to the user Experience feature
6.6 Increase animation effect
In the previous chapter we added an animation effect to the menu, which we continued to add to the animation, including:
Fade effect of new activity
Remove fade effect from activity
Fade effect of new rule
Fade Effect of Delete rule
This article source address: http://www.cnblogs.com/chegan/archive/2009/05/13/1455307.htm
6.6.1 Fade Effect
The implementation of these animations is relatively simple, first you need to add a DoubleAnimation object, the XAML code is as follows:
<Storyboard x:Name="sbDisplay">
<DoubleAnimation From="0" To="0.8" Duration="00:00:1.0"
Storyboard.TargetName=""
Storyboard.TargetProperty="Opacity" >
</DoubleAnimation>
</Storyboard>
TargetName the object that implements the animation effect.
TargetProperty indicates that the object's attribute implements animation
From indicates the initial value of the TargetProperty
To indicate the final value of the TargetProperty
Duration indicates the duration of the animation
These property values can also be set in the background using C # code. In the course of my use, I used the
Storyboard.SetTargetName(sbDisplay, "currentPic");
To dynamically set the TargetName value of the animation, but it is always wrong during the run, as shown in the following illustration:
Seems to be related to namespaces and later uses
Storyboard.SetTarget(sbDisplay, currentPic);
To get the correct results, if you have any knowledge of this, please help to give reasons.
In addition, the TargetProperty property also supports user-defined properties, and this feature is also used in this program because of our custom animation effects.
You can implement the fade in activity and rule by calling the animation's start function in the active and rule constructors.
sbDisplay.Begin();