gzpk

2011年9月1日

SilverLight中App.xaml的用途

摘要: 官方说的用途有下面这些:定义全局资源:我们可以把Application级别的资源放在这里,用Application.Resources属性访问,常用的有styles, data templates,control templates。全局事件处理:Startup,Exit和UnhandledException.全局引用Application.Current指定RootVisible:RootVisual用来设置Silverlight启动控件,这个属性在Startup事件中设置.本地安装application:使用Install方法你可以让用户在浏览器外本地安装application检查更新:本 阅读全文

posted @ 2011-09-01 10:08 gzpk 阅读(1338) 评论(1) 推荐(0)

SilverLight在后台改变控件的样式

摘要: 在前台,我们可以通过语句Style="{StaticResourcebtnStyle}"来绑定样式,在后台中对应的语句是:ButtonTest.Style=App.Current.Resources["btnStyle"]asStyle;或者:ButtonTest.Style=System.Windows.Application.Current.Resources["btnStyle"]asStyle; 阅读全文

posted @ 2011-09-01 09:28 gzpk 阅读(1090) 评论(0) 推荐(0)

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

导航

统计

点击右上角即可分享
微信分享提示