随笔分类 -  Silverlight

摘要:public class Person{ [Required(ErrorMessage = "必填选项")] public string Name {set; get;}}如果 客户端 绑定时this.DataContext = new Person(); 起不了验证的作用, 应改为 this.DataContext = new Person { Name = ""}; 阅读全文
posted @ 2013-05-12 07:43 Ken-Cai 阅读(125) 评论(0) 推荐(0) 编辑
摘要:1. 两个验证类型语法验证,该验证类型是通过成员的数据类型定义对比验证当前输入数据类型得出的验证结果语义验证,该验证类型是将当前输入数据根据特定数据限制代码进行验证2. BindingValidationError事件3. NotifyOnValidationError属性4.ValidatesOnExceptions属性5.Silverlight DataAnnotation验证 阅读全文
posted @ 2013-05-11 22:05 Ken-Cai 阅读(166) 评论(0) 推荐(0) 编辑
摘要:http://msdn.microsoft.com/zh-cn/library/ee942449(v=vs.91).aspx1. 选择网站项目,在“项目”菜单上,选择“ASP.NET 配置”细说ASP.NET Forms身份认证C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe 用于创建Membership的数据库 阅读全文
posted @ 2013-05-04 16:43 Ken-Cai 阅读(172) 评论(0) 推荐(0) 编辑
摘要:在 vs 2012 和 Silverlight_5_Toolkit_December_2011使用会出现错误。 (不知道什么原因)。后来用了http://www.cnblogs.com/zhw511006/archive/2009/11/29/1613303.html的方法, 虽然界面不一样, 但可以测试 阅读全文
posted @ 2013-04-18 14:02 Ken-Cai 阅读(130) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/lianchangshuai/article/details/7964516 阅读全文
posted @ 2013-04-18 11:30 Ken-Cai 阅读(148) 评论(0) 推荐(0) 编辑
摘要:除了 引用 System.ComponentModel.Composition 外, 还需 System.ComponentModel.Composition.Initialization 阅读全文
posted @ 2013-03-25 13:18 Ken-Cai 阅读(150) 评论(0) 推荐(0) 编辑
摘要:有时没智能提示, 但编译可以通过, 而且运行也没问题http://msmvps.com/blogs/deborahk/archive/2009/11/10/silverlight-and-ria-sharing-your-business-object-files.aspx 阅读全文
posted @ 2013-03-13 21:38 Ken-Cai 阅读(132) 评论(0) 推荐(0) 编辑
摘要:如下面的全角括号: 酚醛泡沫(PF)这个不仅仅是 DataGrid 的问题。 其它的控件也一样。指定中文字体就可以了: 如下所示, 字体为SimSun(宋体)。注意 SimSun 不能写出中文的。<TextBox Text="1-1 (1+1×2)" VerticalAlignment="Top" Width="120" FontFamily="SimSun"/>一般的解决方法是设置全局样式。 在App.xaml 中 <Application.Resources> <Styl 阅读全文
posted @ 2013-03-12 09:57 Ken-Cai 阅读(193) 评论(0) 推荐(0) 编辑
摘要:<sdk:AutoCompleteBox Name="autoCompleteBox1" Text="{Binding Path=StudentName, Mode=TwoWay}" Width="200" TextChanged="autoCompleteBox1_TextChanged" />虽然是双向绑定. 但是当StudentName的值改变后, 不能更新AutoCompleteBox的Text.有待测试. 阅读全文
posted @ 2013-03-11 22:48 Ken-Cai 阅读(263) 评论(0) 推荐(0) 编辑
摘要:MVVMLight 中的 Messager 一般要 UnRegister.很多时 UnRegister 是在 UnLoaded 事件中处理的.TabControl 里面的 TabPage 改变是, 会触发 TabPage 里面的控件的 UnLoaded 事件, 这时可能就触发了 Messager 的 UnRegister 了.解决方法: 遇到要添加到 TabPage 的控件, 不要在UnLoaded 中运行 UnRegister. 阅读全文
posted @ 2013-01-29 13:27 Ken-Cai 阅读(215) 评论(0) 推荐(0) 编辑
摘要:http://www.soaspx.com/dotnet/silverlight/silverlight_20100809_5273.htmlhttp://social.microsoft.com/Forums/zh-CN/silverlightzhchs/thread/8e44d306-a68b-4ee7-a82f-68a12e82c7e4http://bbs.csdn.net/topics/350241111http://www.cnblogs.com/luosm/articles/2261826.htmlhttp://blog.csdn.net/xuan444150/article/de 阅读全文
posted @ 2013-01-21 22:59 Ken-Cai 阅读(146) 评论(0) 推荐(0) 编辑
摘要:FloatingWindow 里面有个 Host属性, 不过是private类型.一种方法是修改源代码, 将private 改为 public.另一种方法: 查看Host属性的代码: private FloatingWindowHost Host { get { return this.Parent as FloatingWindowHost; } }// this.Parent as FloatingWindowHost 就是 Host 了 阅读全文
posted @ 2013-01-04 10:55 Ken-Cai 阅读(173) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/626498301/archive/2011/03/30/1999549.html这个例子有代码下载. 要好好学习. 涉及到MVVM. 例子下载在 E:\Study\AutoComplateBoxSamples\AutoComplateBoxSampleshttp://www.cnblogs.com/Kinglee/archive/2009/09/25/1573838.html 阅读全文
posted @ 2013-01-01 20:01 Ken-Cai 阅读(180) 评论(0) 推荐(0) 编辑
摘要:网上大多的例子是通过绑定到EditEnded事件,如下所示<toolkit:DataForm Name="dataForm员工" CurrentItem="{Binding 员工Obj}" CommandButtonsVisibility="Commit" AutoCommit="False" KeyDown="dataForm员工_KeyDown" CommitButtonContent="保存" CancelButtonContent="取消"& 阅读全文
posted @ 2012-12-17 12:02 Ken-Cai 阅读(344) 评论(0) 推荐(0) 编辑
摘要:this.dataForm.IsReadOnly = value;this.dataForm.OnApplyTemplate(); //刷新模板状态 阅读全文
posted @ 2012-12-11 09:41 Ken-Cai 阅读(122) 评论(0) 推荐(0) 编辑
摘要:http://dotnetslackers.com/articles/silverlight/Using-the-TreeView-control-in-Silverlight-4.aspx<UserControl x:Class="TreeViewDemo.MainPage" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presen 阅读全文
posted @ 2012-12-10 07:28 Ken-Cai 阅读(174) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Windows.Forms;namespace ExcelTest{ /// <summary> /// 将Excel 2007 读取成 Byte[]. 然后将 Byte[] 保存到另一个文件中. 测试是否出错. /// </summary> public class ExcelToByteAry_ThenSaveExcelcs { public By 阅读全文
posted @ 2012-10-12 22:58 Ken-Cai 阅读(1748) 评论(0) 推荐(0) 编辑
摘要:http://dotnetzip.codeplex.com/ 阅读全文
posted @ 2012-10-12 22:00 Ken-Cai 阅读(161) 评论(0) 推荐(0) 编辑
摘要:http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm#/?sref=BitmapSample 阅读全文
posted @ 2012-10-09 10:37 Ken-Cai 阅读(223) 评论(0) 推荐(0) 编辑
摘要:http://johnliu.net/blog/2012/1/9/pasting-pictures-from-clipboard-to-sharepoint-in-browser-via.html http://forums.silverlight.net/t/192277.aspx/1 阅读全文
posted @ 2012-10-08 19:02 Ken-Cai 阅读(145) 评论(0) 推荐(0) 编辑

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