//private void Data_ImageChanged(object sender, TmNodeEventArgs e) //{ // ImageIndex = ((TmNode)Tag).ImageIndex; // SelectedImageIndex = ((TmNode)Tag).ImageIndex; //} private void Data_ChildRemoved(object sender, TmNodeEventArgs e) { //If I am filtering/sorting, then the indices of the //TmTreeNode.Nodes and TMNode.Children collections will not align. //Nodes.RemoveAt(e.Index); foreach (TmTreeNode node in Nodes) if (node.TmNode == e.Node) { Nodes.Remove(node); break; } }
private void Data_ChildAdded(object sender, TmNodeEventArgs e) { Nodes.Insert(e.Index, new TmTreeNode(e.Node)); // this node }