void nodes_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (!isUpdating) {
// verify that selected node still belongs to the tree
if (!OwnsNode(selectedNode)) SetSelectedNode(null);
// rebuild the view
dropDown.UpdateVisibleItems();
}
}