当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 让Silverlight 2.0动画动起来Making Silverlight 2.0 animation Start(不能运动原因)

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 让Silverlight 2.0动画动起来Making Silverlight 2.0 animation Start(不能运动原因)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 242 ::
收藏到网摘: n/a

Microsoft Expression Blend 2 制作动画个人感觉倒像3DMAX 可以自动捕捉关键帧 问题又来了
Microsoft Expression Blend 2制作的动画 无法动起来
现在大师教 大家怎么让Silverlight.2.0动画动起来
很简单
你制作了动画
但是没有触发点
或者说没有告诉什么时候开始
Microsoft Visual Web Developer 2008 Express Edition或者VS2008
然后打上Silverlight Tools 补丁
这样要方便
当然记事本也可以
打开 代码部分 比如我的就是Page.xaml.cs
比如我要让 我制作的动画 ballmove (Microsoft Expression Blend故事板的名字)
要在启动时候运行动画:
如果你看不懂这些代码
建议找本书 比如WROX红皮书 C#入门经典
复制代码 代码如下:

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);
//委托挂钩注册,这样才有效,建议用VS或者VWD时候,用TAB键操作
}
void Page_Loaded(object sender, RoutedEventArgs e)
{
ballmove.Begin();//动起来
}
}
}