摘要:
项目中要求datagrid能支持双击导航。但客户有可能点击到其它地方,比如column header, Border,....怎么来确定用户双击的是datagrid的某一行用下面的方法可以解决 public DataGridRow GetDataGridRow(MouseButtonEventArgs e) { FrameworkElement source = e.OriginalSource as FrameworkElement; return DataGridRow.GetRowContainingElement(source); }上面函数返回空的则表示点击了其它地方,反之也成立 阅读全文
posted @ 2011-06-22 18:28
mjg
阅读(1188)
评论(3)
推荐(1)

浙公网安备 33010602011771号