最简单的方法: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控件NumericUpDown示例(转载请注明出处)工具:Expression Blend 2 + Visual Studio 2008语言:C#框架:.Net Framework 3.5工程:WPF Windows Application布局设计预览XAML代码: ...
分类:
其他好文 时间:
2014-07-03 00:02:34
阅读次数:
1335
首先在绑定的时候进行转换: public class RegionConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, Syste...
分类:
其他好文 时间:
2014-07-02 22:36:41
阅读次数:
317
上图是效果 可以双方向拖动废话不多说上代码界面: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