WPF中改变选中行的颜色是很简单的,就是用触发器:比如:以DataGrid为例: DataGrid.RowStyle Style TargetType= DataGridRow SetterProperty= Background Value= White / Style .Triggers Tri...
分类:
其他好文 时间:
2014-08-15 12:11:28
阅读次数:
232
Well, in WPF the difference between ListView and DataGrid is just one. Editing. You need editing use DataGrid, otherwise use ListView. You can edit in...
分类:
其他好文 时间:
2014-08-15 12:11:19
阅读次数:
211
DataGrid运行效果: xaml 代码: DataGridName= dtgData ItemsSource= {Binding} AutoGenerateColumns= False DataGrid.Columns DataGridTextColumnBinding= {BindingPat...
分类:
其他好文 时间:
2014-08-15 11:59:48
阅读次数:
231
一、功能、布局描述
1、使用Grid的GridSplitter实现可拖拽分隔栏效果。当ShowsPreview设置为True时,拖拽过程中不会刷新(控件内容要等到鼠标释放时才变化);当ShowsPreview设置为False时,控件内容实时跟随变化。
2、使用ViewBox特性实现控件内容随拖拽自动变化。
3、布局代码:
...
分类:
其他好文 时间:
2014-08-15 10:48:08
阅读次数:
246
public void GetPath(System.Windows.Controls.TextBox TB) { FolderBrowserDialog FBD = new FolderBrowserDialog(); FB...
分类:
其他好文 时间:
2014-08-14 19:59:19
阅读次数:
204
1、WPF的一个触摸屏项目,需要输入姓名,但是屏幕不支持汉字输入,使用虚拟键盘不稳定,为了解决该问题特此进行处理。2、新建一个类转换类,里面初始化一个数组,数组包含拼音,以及拼音下的常用的汉字。3、根据拼音,对照出对应的汉字,然后在对汉字进行拆分,获取到单个汉字。例子如下: private stat...
分类:
其他好文 时间:
2014-08-14 19:45:39
阅读次数:
173
这儿需要使用两个系统函数:BOOL WINAPI FreeConsole(void); //// 关闭控制台窗口,参考:http://msdn.microsoft.com/en-us/library/ms683150%28VS.85%29.aspxBOOL WINAPI AllocConsole(v...
BitmapImage bi = new BitmapImage(); // BitmapImage.UriSource must be in a BeginInit/EndInit block. bi.BeginInit(); ...
分类:
其他好文 时间:
2014-08-14 15:50:28
阅读次数:
277
-- Create sequence create sequence MFB_REGION_SEQminvalue 1maxvalue 999999999start with 6increment by 1nocache;针对这个序列添加触发器。CREATE OR REPLACE TRIGGER T...
分类:
数据库 时间:
2014-08-14 14:02:08
阅读次数:
188
要故意出发异常,可以使用raise语句,形式如下:raise #manually trigger an exceptionraise, #pass extra data to catcher tooraise #re-raise the most recent excepti第二种形式可以随着异常....
分类:
编程语言 时间:
2014-08-14 01:23:57
阅读次数:
320