Exemplo n.º 1
0
        internal void EndInsert()
        {
            if (_insertBranch != null)
            {
                try
                {
                    // tell branch to cancel the insert
                    _insertBranch.EndInsert(_insertIndex);

                    // redraw appropriate portions of the tree
                    var branch = (IBranch)_insertBranch;
                    Tree.DisplayDataChanged(
                        new DisplayDataChangedData(
                            VirtualTreeDisplayDataChanges.VisibleElements, branch, _insertIndex, -1, branch.VisibleItemCount - _insertIndex));
                }
                finally
                {
                    _insertBranch = null;
                    _insertIndex  = -1;
                }
            }
        }