欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

WPF TreeView 节点双击事件

程序员文章站 2022-06-08 13:55:37
...
private void MyTree_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if(e.ClickCount != 2)
            {
                return;
            }
            if(null!=this.MyTree.SelectedItem)
            {
                var curSel = this.MyTree.SelectedItem as MyTreeNode;
                MessageBox.Show(curSel.name);
            }
        }

 

相关标签: C# WPF