会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
黑龙大爷
博客园
首页
新随笔
联系
订阅
管理
2018年3月2日
无法将键盘焦点给 TextBox 的解决方案
摘要: 只用 Keyboard.Focus 似乎不能让像是在TreeViewItem的Header之类的属性中的文本框获取焦点。 Dispatcher.BeginInvoke(DispatcherPriority.Input, new Action(delegate() { 目标TextBox.Focus(
阅读全文
posted @ 2018-03-02 19:29 黑龙大爷
阅读(111)
评论(0)
推荐(0)
2017年8月24日
WPF 使用自定义类型作为 TreeView 的数据源
摘要: 1 internal class BinaryNodeItem //作用于内部的自定义类型 2 { 3 public int ID { get; set; } //对应SQL表中id值,本节点ID 4 public string Name { get; set; } //对应SQL表中name值,用
阅读全文
posted @ 2017-08-24 18:25 黑龙大爷
阅读(506)
评论(0)
推荐(0)
2017年8月3日
WPF DataGrid 获取当前选中项
摘要: 1 (DataRowView)DataGrid_Result.CurrentCell.Item)[DataGrid_Result.CurrentCell.Column.DisplayIndex].ToString() 测试时 SelectionMode 为 Cell。 CurrentCell 和 S
阅读全文
posted @ 2017-08-03 17:43 黑龙大爷
阅读(2917)
评论(0)
推荐(1)
公告