public void Add(PushPanelItem item) { if (item == null) { throw new ArgumentNullException("item"); } _owner.AddItem(item); }
void IList.Insert(int index, object value) { PushPanelItem item = value as PushPanelItem; if (value != null) { ((IList)_owner.Controls).Insert(index, value); } }
void IList.Remove(object value) { PushPanelItem item = value as PushPanelItem; if (value != null) { Remove(item); } }
bool IList.Contains(object value) { PushPanelItem item = value as PushPanelItem; if (value != null) { return(Contains(item)); } return(false); }
int IList.IndexOf(object value) { PushPanelItem item = value as PushPanelItem; if (value != null) { return(IndexOf(item)); } return(-1); }
int IList.Add(object value) { PushPanelItem item = value as PushPanelItem; if (item != null) { Add(item); return(IndexOf(item)); } return(-1); }
internal void CollapseItem(PushPanelItem item) { if (item == null || !item.IsExpanded) { return; } ChangeItemHeight(item, false); ReLayout(); item.IsExpanded = false; _expandItem = null; }
protected override void OnControlRemoved(ControlEventArgs e) { PushPanelItem item = e.Control as PushPanelItem; if (item != null) { item.Owner = null; item.CaptionMouseClick -= ItemCaptionMouseClick; } base.OnControlRemoved(e); ReLayout(); }
public void ExpandItem(int index) { try { PushPanelItem item = _items[index]; if (item != null) { ExpandItem(item); } } catch { } }
public void ExpandItem(string name) { try { PushPanelItem item = _items[name]; if (item != null) { ExpandItem(item); } } catch { } }
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(); }
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; } } }
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; }
public int IndexOf(PushPanelItem item) { return _owner.Controls.IndexOf(item); }
public bool Contains(PushPanelItem item) { return _owner.Controls.Contains(item); }
public void AddRange(PushPanelItem[] values) { foreach (PushPanelItem item in values) { Add(item); } }
public void Remove(PushPanelItem item) { _owner.Controls.Remove(item); }
public PushPanelItemCaptionClickEventArgs(PushPanelItem item) : this() { _item = item; }
public bool Contains(PushPanelItem item) { return(_owner.Controls.Contains(item)); }
public int IndexOf(PushPanelItem item) { return(_owner.Controls.IndexOf(item)); }