随笔分类 -  Silverlight

摘要:利用了Silverlight toolkit中的TreeView控件实现了区服选择。TreeView控件在Silverlight toolkit中,需要去http://silverlight.codeplex.com/下载,然后安装,最新版本是5.0的,4.0的也可以下载。1.引用程序集:System.Windows.Controls.Toolkit.dll2.新建silverlight子控件页面 childRegionWorld1.xaml3.在childRegionWorld1.xaml中的usercontrol 中添加xmlns:toolkit="clrnamespace:Sy 阅读全文
posted @ 2012-04-22 20:19 chenping2008 阅读(946) 评论(0) 推荐(1)
摘要:在silverlight中图片显示的方法在前面的博文中提到过了几种方法,具体的可见:http://www.cnblogs.com/chenping-987123/archive/2011/04/22/2024818.html现在补充一种SteamResourceInfo的方法。具体的见代码如下:首先放置一张图片到silverlight项目的根目录下:然后在mainpage.xaml 的构造函数中写入代码:StreamResourceInfosri=Application.GetResourceStream(newUri("SilverlightApplication3;compone 阅读全文
posted @ 2011-09-29 18:02 chenping2008 阅读(701) 评论(0) 推荐(1)
摘要:举例说明了silverlight中childwindow的用法:AddPerson.xaml:<Gridx:Name="LayoutRoot"Background="White"><ButtonContent="Add"Height="23"HorizontalAlignment="Left"Margin="30,22,0,0"Name="btnAddPerson"VerticalAlignment="Top"Widt 阅读全文
posted @ 2011-07-17 14:36 chenping2008 阅读(3188) 评论(0) 推荐(1)
摘要:首先新建一个Silverlight应用程序带Web的,在Web程序中放入一个txt文件,名为TextFile1.txt。内容Silverlight is very good!然后在silverlight项目中添加一个silverlight user control名为WebClientDownResource.xamlxaml的内容为:<Gridx:Name="LayoutRoot"Background="White"><Grid.ColumnDefinitions><ColumnDefinition></Col 阅读全文
posted @ 2011-04-24 17:16 chenping2008 阅读(1576) 评论(2) 推荐(1)
摘要:silverlight中显示一个图片有很多的中方法,xaml中的image控件或者自定编写程序来生成image控件。silverlight中显示的图片只能是Bitmap, JPG, PNG(64位颜色的或者灰色的PNG不支持). 请注意那个gif这个动画图片是不能使用的。下面就一一的说说显示图片的方法。(1) 我们拷贝一个图片到新建的silverlight程序集中,然后新建一个silverlight user control, 名为ImagePage.xaml。然后添加一个Image控件到Grid中,然后设置Source,Source="imag1.jpg" ,然后运行we 阅读全文
posted @ 2011-04-22 13:28 chenping2008 阅读(9718) 评论(2) 推荐(3)