随笔分类 - SilverLight
摘要:前提:ContactInfo对象有ID属性且有值 //DataGrid选中改变 private void dgContact_SelectionChanged(object sender, SelectionChangedEventArgs e) { MessageBox.Show(((ContactInfo)((DataGrid)sender).SelectedItem).ID.ToString()); }
阅读全文
摘要:1.Web发布到IIS为网站假设端口为20000。2.配置HIMI类型: .xaml application/xmal+xml .xap application/x-silverlight-app3.用WinRAR解压Web\ClientBin\Strongsoft.FloodControl.Module.Contact.xap文件到磁盘上4.修改Strongsoft.FloodControl.Module.Contact\ServiceReferences.ClientConfig里面的<endpoint address节点"http://localhost:20000/Se
阅读全文
摘要:System.Windows.Browser.HtmlDocument doc = System.Windows.Browser.HtmlPage.Document;if (doc.QueryString.Count > 0){ STNM = doc.QueryString["STNM"].ToString();}
阅读全文
摘要:[一篮饭特稀原创,转载请注明出处http://www.cnblogs.com/wanghafan/archive/2012/05/10/2493808.html]在SL和WPF中定义依赖项属性来设定属性系统中要实现设置IsTree为true,显示树状列表,否则显示下拉列表功能App.xaml.cs代码:View Code 1 private void Application_Startup(object sender, StartupEventArgs e)2 {3 //this.RootVisual = new MainPage();4 ...
阅读全文
摘要:[一篮饭特稀原创,转载请注明出处http://www.cnblogs.com/wanghafan/archive/2012/05/10/2493799.html]银光中ComboBox+TreeView构成自定义控件:思路1:textbox+button+treeview 缺点:不能跨ChildWindow、零散 [实现]思路2:ComboBox+TreeView+textbox 优点:可以跨ChildWindow [实现]+[推荐]思路3:ComboBox+TreeView 优点:可以跨ChildWindow、紧凑 [未实现]给出思路2的核心代码:xaml:View Code 1 <C
阅读全文
摘要:1 private void Init() 2 { 3 TreeViewItem tvi_0 = new TreeViewItem(); 4 5 CheckBox cb = new CheckBox(); 6 cb.Content = "所有"; 7 cb.Checked += new RoutedEventHandler((sender, e) =>{foreach (TreeViewItem item in tvi_0.Items){((item.Header as StackPanel).Children[0] as CheckBox...
阅读全文
摘要:ContactShow.aspx:View Code 1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactShow.aspx.cs" Inherits="Strongsoft.FloodControl.Web.Contact.ContactShow" %> 2 <%@ Register Assembly="System.Web.Silverlight" Namespace="System
阅读全文