Exemplo n.º 1
0
 public void Remove(PushPanelItem item)
 {
     _owner.Controls.Remove(item);
 }
Exemplo n.º 2
0
 public bool Contains(PushPanelItem item)
 {
     return _owner.Controls.Contains(item);
 }
Exemplo n.º 3
0
 public int IndexOf(PushPanelItem item)
 {
     return _owner.Controls.IndexOf(item);
 }
Exemplo n.º 4
0
 public void Add(PushPanelItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     _owner.AddItem(item);
 }
Exemplo n.º 5
0
 public void AddRange(PushPanelItem[] values)
 {
     foreach (PushPanelItem item in values)
     {
         Add(item);
     }
 }
Exemplo n.º 6
0
        private void AddItem(PushPanelItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            item.Height = item.CaptionHeight;
            item.Owner = this;
            item.CaptionMouseClick += ItemCaptionMouseClick;

            base.Controls.Add(item);

            ReLayout();
        }
Exemplo n.º 7
0
        internal void ExpandItem(PushPanelItem item)
        {
            if (item == null || _expandItem == item)
            {
                return;
            }

            if (_expandItem != null)
            {
                ChangeItemHeight(_expandItem, false);
            }

            ChangeItemHeight(item, true);

            ReLayout();
            if (_expandItem != null)
            {
                _expandItem.IsExpanded = false;
            }
            item.IsExpanded = true;
            _expandItem = item;
        }
Exemplo n.º 8
0
        internal void CollapseItem(PushPanelItem item)
        {
            if (item == null || !item.IsExpanded)
            {
                return;
            }

            ChangeItemHeight(item, false);
            ReLayout();
            item.IsExpanded = false;
            _expandItem = null;
        }
Exemplo n.º 9
0
        internal void ChangeItemHeight(PushPanelItem item, bool expand)
        {
            if (item == null)
            {
                return;
            }

            if (expand)
            {
                item.Height = item.CaptionHeight + CalcuExpandItemHeight();
            }
            else
            {
                if (item.IsExpanded)
                {
                    item.Height = item.CaptionHeight;
                }
            }
        }
 public PushPanelItemCaptionClickEventArgs(PushPanelItem item)
     : this()
 {
     _item = item;
 }