上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 45 下一页
摘要: Refelector工具,可以反编译dll,查看代码,但这个每次只能查看单个文件,幸运的是有一种插件Reflector.FileDisassembler.dll,可以产生整个项目文件。但这个项目文件通常是不能编译通过的。在不被混淆的的情况下可以看到部分代码。有时候我们看到了一些漂亮的silverlight案例,我们需要参考这些案例,列如我想做这样的效果http://www.easyinventorysystem.com/inventory.aspx,但我不知道这个是怎么做的,这是Silverlight Spy就非常有用了。下面是图片演示了Silverlight Spy的简单用法,结合Refel 阅读全文
posted @ 2011-09-26 08:58 焦涛 阅读(287) 评论(0) 推荐(0)
摘要: 可以参考的链接:Custom Cursors in SilverlightSilverlight Tip of the Day #28: How to Implement a Custom Mouse CursorSilverlight Custom CursorSilverlight 解谜游戏 之十一 鼠标的新衣 阅读全文
posted @ 2011-09-25 11:40 焦涛 阅读(259) 评论(0) 推荐(0)
摘要: 默认情况下BusyIndicator样式横向的波纹状,下面我们改变下BusyIndicator样式,让其更炫。我们可以在Blend中新建一个ResourceDictionary1.xaml文件,里面放两个BusyIndicator样式,分别为BusyIndicator1和BusyIndicator2。然后在页面中添加BusyIndicator控件,然后再Blend中选择一个你喜欢的样式,那么BusyIndicator就具有这样的样式了。简单吧!下载地址:下面看看效果参考还可以自己制作加载动画,请参看下面链接(1)Blend制作的下载动画 (2)简单的CircularLoader制作 阅读全文
posted @ 2011-09-21 18:35 焦涛 阅读(2005) 评论(1) 推荐(0)
摘要: /* - - - - - - - - - - - - - - - - - - - - - - - - * Stream 和 byte[] 之间的转换 * - - - - - - - - - - - - - - - - - - - - - - - */ /// <summary> /// 将 Stream 转成 byte[] /// </summary> public byte[] StreamToBytes(Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, byt 阅读全文
posted @ 2011-09-20 17:10 焦涛 阅读(169) 评论(0) 推荐(0)
摘要: 前面一节,我们学习了怎样处理POCO实体含有复杂类型,但是对于增删改会出错,我们还要继续处理,要添加[Composition]特殊属性标识符。// "Master" domain entity class.public class Parameter { [Key] public long Id { get; set; } public string Name { get; set; } [Include] [Composition] [Association("Parameter_Options", "Id", "Para 阅读全文
posted @ 2011-09-20 15:23 焦涛 阅读(397) 评论(0) 推荐(0)
摘要: 在有些情况下,我们需要在POCO实体中定义一个复杂的类型,像下面的场景// "Master" domain entity class.public class Parameter { [Key] public long Id { get; set; } public string Name { get; set; } public List<Option> Options { get; set; }}// "Details" domain entity class.public class Option { [Key] public long 阅读全文
posted @ 2011-09-20 15:11 焦涛 阅读(350) 评论(0) 推荐(0)
摘要: 定义一个让POCO实体在WCF RIA Service的客户端暴露出来.POCO实体很有用,有时我们需要去数据库中某表中的部分字段,在WCF RIA Service中就可以定义一个POCO实体。来减小数据的传输量。 (1)首先如何定义POCO实体 public class UploadFileInf 阅读全文
posted @ 2011-09-20 14:40 焦涛 阅读(653) 评论(0) 推荐(0)
摘要: 本来想再Image上做将图片拖动到Image控件上时,显示图片,但是设置AllowDrop任然无效。只能用Grid等控件作为容器,并设置其父容器为AllowDrop=true.而且不能在xaml中利用Image的方式,因为拖动图片为项目的外部文件,在获取图片的FullName会报如下的错误 <Image Source="{Binding ImageUri}" Width="200" Height="200"/> 只能用替代的方式,这种方式就是要知道Image的Name,对于MVVM方式不利 BitmapImage imag 阅读全文
posted @ 2011-09-15 19:11 焦涛 阅读(1801) 评论(0) 推荐(0)
摘要: (一)改变HyperlinkButton的背景颜色,和去掉边框,用Blend4在Grid上拖上几个HyperlinkButton按钮,然后选中一个HyperlinkButton按按钮,按如下截图操作然后修改几个状态下得BackGround的颜色就可以了,如下图(二)将设计好的样式引用于其他的HyperlinkButton,那么其他的HyperlinkButton就具有相同的样式了(三)如何改变HyperlinkButton字体的颜色,鼠标移入和移除都不一样的颜色,这个似乎不能在Blend中修改,只有在后台代码的MouseEnter和MouseLeave中修改 private void hyp. 阅读全文
posted @ 2011-09-14 10:08 焦涛 阅读(3134) 评论(0) 推荐(1)
摘要: (一)创建默认控件模板要求开发人员使用您的控件定义他们自己的控件模板是不合理的。自定义控件应具有默认的模板,提供默认模板后,人们仍可以使用其他模板,将其覆盖,但如果不要求提供模板,您的控件会更加吸引人。(1)向控件项目添加名为 Generic.xaml 的文件。(是的,此文件必须命名为 Generic.xaml。大小写无关紧要,但文件名不能改变。)(2)在 Generic.xaml 中定义样式,该样式使用属性 setter 将值分配给控件的 Template 属性. Silverlight 运行时自动在控件程序集(Generic.xaml 作为数据源嵌入其中)中查找 Generic.xaml 阅读全文
posted @ 2011-09-13 09:43 焦涛 阅读(672) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 45 下一页