コード例 #1
0
        /// <summary>
        /// Expands the item to display any child items.
        /// </summary>
        public virtual void Expand()            // Aulofee customization - start. Made method virtual. Custo end
        {
            if (_expanded)
            {
                return;
            }

            if (_listView != null)
            {
                TreeListViewCancelEventArgs e = new TreeListViewCancelEventArgs(null, this);

                _listView.OnItemExpanding(e);

                if (e.Cancel)
                {
                    return;
                }
            }

            _expanded = true;

            if (_items != null && _items.Count > 0)
            {
                _listView.RecalculateItemPositions(this);
            }
            else
            {
                _listView.Invalidate();
            }

            if (_listView != null)
            {
                _listView.OnItemExpanded(new TreeListViewEventArgs(null, this));
            }
        }