最简单的方法:System.Diagnostics.Process.Start(@"路径");网上的其他方法:Process p = new System.Diagnostics.Process(); p.StartInfo.FileName =@"路径"; ...
分类:
其他好文 时间:
2014-07-03 07:12:57
阅读次数:
227
如果计算机存在多个显示器,这时设置wpf窗口为最大化,窗口只能在主显示器中实现最大化,如果想要实现窗口拉伸至多屏,需要获取所有显示器分辨率之和。这时用到了System.Windows.SystemParameters命名空间。 SystemParameters 是一个类,包含多个系...
分类:
其他好文 时间:
2014-07-03 06:37:14
阅读次数:
186
/// /// /// public static class DispatcherHelper { /// /// Simulate Application.DoEvents function of class. /// [SecurityPermissionAttribute ( Se...
分类:
移动开发 时间:
2014-07-03 06:16:08
阅读次数:
379
開發WPF程序時,使用Devexpress的GridControl控件用ItemSource綁定數據,在頁面進行編輯時,當屬性繼承INotifyPropertyChanged接口時會同步更新後臺數據。今天在開發時遇到一種情況,當通過GridControl中Row上Button【Command】改變行...
分类:
其他好文 时间:
2014-07-03 06:02:48
阅读次数:
192
WPF 使用这个方法打开文件,很方便,而且可以记住上次打开的路径。 Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog(); openFile...
上图是效果 可以双方向拖动废话不多说上代码界面:1 5 7 8 后台代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 ...
分类:
其他好文 时间:
2014-07-01 18:13:47
阅读次数:
247
1.InteropBitmap指定内存,绑定WPF的Imag控件的Source属性创建InteropBitmap的时候,像素的格式必须为PixelFormats.Bgr32,如果不是的话在绑定到Image控件的Source属性,刷新新界面(BitmapSource.Invalidate())的时候会...
分类:
其他好文 时间:
2014-07-01 18:11:06
阅读次数:
197
1.示例1 ObservableCollection imgs = new ObservableCollection(); //集合,即数据源 comboBox1.SelectedValuePath = "Id"; //程序内部维护的值 comboBox1.D...
分类:
其他好文 时间:
2014-07-01 16:16:41
阅读次数:
252
组件常用方法:BeginEdit:使DataGrid进入编辑状态。CancelEdit:取消DataGrid的编辑状态。CollapseRowGroup:闭合DataGrid的行分组。CommitEdit:确认DataGrid的编辑完成。ExpandRowGroup:展开DataGrid的行分组。G...
分类:
其他好文 时间:
2014-07-01 10:36:01
阅读次数:
612
最近项目中遇到的问题,datagrid编辑后无法立刻与后台同步,只有失去焦点时才更新,在网上找了找,这个方法可以用用:转自:http://blog.csdn.net/lianchangshuai/article/details/7787344解决办法:在列的绑定属性里加上UpdateSourceTr...
分类:
其他好文 时间:
2014-07-01 00:28:45
阅读次数:
191