Allows Silverlight 2.0 to be animated. Making Silverlight 2.0 animation Start)
Source: Internet
Author: User
The problem is coming again.
The animation created by Microsoft Expression Blend 2 cannot be moved.
Now the Masters teach you how to make Silverlight.2.0 animated
Simple
You made an animation.
But no trigger point
Or do not tell when to start
Microsoft Visual Web Developer 2008 Express Edition or VS2008
Install the Silverlight Tools patch.
This is convenient
Of course, you can also use notepad.
Open the code section. For example, my section is Page. xaml. cs.
For example, I want to make the animation ballmove (Microsoft Expression Blend storyboard name)
To run the animation at startup:
If you don't understand the code
We recommend that you find this book, such as the WROX Redbook C # entry-level classic
Copy codeThe Code is as follows: using System;
Using System. Windows;
Using System. Windows. Controls;
Using System. Windows. Documents;
Using System. Windows. Ink;
Using System. Windows. Input;
Using System. Windows. Media;
Using System. Windows. Media. Animation;
Using System. Windows. Shapes;
Namespace feiruwenzi
{
Public partial class Page: UserControl
{
Public Page ()
{
// Required to initialize variables
InitializeComponent ();
This. Loaded + = new RoutedEventHandler (Page_Loaded );
// Delegate hook registration, which is valid. We recommend that you use the TAB key when using VS or VWD.
}
Void Page_Loaded (object sender, RoutedEventArgs e)
{
Ballmove. Begin (); // start
}
}
}
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.