1 var ids=[]; 2 ids=getChildren(ids, treeNode);//TreeNode是选中节点,ids是子节点id数组,格式:123,223,4,55 1.获取直接子节点的id //返回值包含选中节点的id,即ids[0] function getChildren(ids, treeNode) { ids.push(treeNode.id);//选中节点id,即父节点id if (treeNode.isParent) { for (var obj in treeNo
1.TreeView选择事件执行两次 Very often, we need to execute some code in SelectedItemChanged depending on the selected TreeViewItem. ButSelectedItemChanged is called twice. This is due to stealing focus from the main window, which is screwing something up. Wha