WPF/C# Treeview 禁用双击折叠展开
给TreeView添加PreviewMouseDoubleClick事件,并在时间内拦截事件路由即可。具体如下:
<TreeView
PreviewMouseDoubleClick="TreeManuscript_PreviewMouseDoubleClick"/>
private void TreeManuscript_PreviewMouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
e.Handled = true;
}