/// <summary> /// Handles the ControlAdded Event for the current instance. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void GroupListControl_ControlAdded(object sender, ControlEventArgs e) { ListGroup lg = (ListGroup)e.Control; lg.Width = this.Width; lg.GroupCollapsed += new ListGroup.GroupExpansionHandler(lg_GroupCollapsed); lg.GroupExpanded += new ListGroup.GroupExpansionHandler(lg_GroupExpanded); }
/// <summary> /// Handles the Expanded event for the current instance. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void lg_GroupExpanded(object sender, EventArgs e) { // Grab a reference to the ListGroup which sent the message: ListGroup expanded = (ListGroup)sender; // If Single item only expansion, collapse all ListGroups in except // the one currently exanding: if (this.SingleItemOnlyExpansion) { this.SuspendLayout(); foreach (ListGroup lg in this.Controls) { if (!lg.Equals(expanded)) { lg.Collapse(); } } this.ResumeLayout(true); } }
public ListGroupEventArgs(ListGroup ListGroup) { }
public ListGroupColumnCollection(ListGroup Owner) : base(Owner) { _Owner = Owner; }
public ListGroupItemCollection(ListGroup Owner) : base(Owner) { _Owner = Owner; }