Exemplo n.º 1
0
        /// <summary>
        /// Notification that all child nodes are being removed.
        /// </summary>
        /// <param name="tc">Reference to owning TreeControl.</param>
        /// <param name="nc">Reference to NodeCollection instance.</param>
        public virtual void NodeCollectionClearing(TreeControl tc, NodeCollection nc)
        {
            // Ensure all children of the node are deselected as they
            // are no longer showing and so cannot be in the selected state
            foreach (Node n in nc)
            {
                tc.DeselectNode(n, true);
            }

            // Ask control to move the focus to new calculated position
            tc.NodeContentCleared(false);
        }