Building a workflow designer with Silverlight (10)

Source: Internet
Author: User

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();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.