文章分类 -  .NET

wpf中combobox选择
摘要:跟WINFORM以及WEB上不一样,例如这种是错误的:foreach ( ComboBoxItem item in this.cb_usertype.Items ) { item.IsSelected = CurrentModel.UserType == Convert.ToInt32(item.Tag); }正确的写法:this.cb_usertype.SelectedIndex = CurrentModel.UserType;原因没深究。 阅读全文
posted @ 2013-04-02 11:04 而立未立 阅读(120) 评论(0) 推荐(0)
关于silverlight 调用 wcf 出现安全性错误的解决办法。
摘要:最近在工作中使用Silverlight访问WCF报如下错误:System.Security.SecurityException: 安全性错误。经过资料查询,必须要在服务器端添加策略。 由于我使用的服务宿主程序为应用程序,所以将策略以文件流的形式承载在内存中。 来看策略服务代码:using System.IO; using System.Reflection; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Web; using Common.Messag... 阅读全文
posted @ 2013-03-29 10:45 而立未立 阅读(123) 评论(0) 推荐(0)