private void ToggleExpandableGroupBoxImage(UltraExpandableGroupBox g) { Image img = g.ExpansionIndicatorExpanded; g.ExpansionIndicatorExpanded = g.ExpansionIndicatorCollapsed; g.ExpansionIndicatorCollapsed = img; }
private void OnAdvancedOptionItemPostedExpandableGroupClick(object sender, EventArgs e) { UltraExpandableGroupBox g = sender as UltraExpandableGroupBox; if (g != null) { UIElement elem = g.UIElement.ElementFromPoint(g.PointToClient(Control.MousePosition)); if (elem is ImageAndTextUIElement.ImageAndTextDependentTextUIElement) { OnAdvancedOptionItemPostedExpandedStateChanging(g, new CancelEventArgs()); } } }
/// <summary> /// Releases the unmanaged resources used by the <see cref="T:System.ComponentModel.Component"/> and optionally releases the managed resources. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } if (this.panel != null) { if (this.panel.Parent != null) { panel.Parent.Controls.Remove(this.panel); } this.panel.Dispose(); this.panel = null; } if (this.brush != null) { this.brush.Dispose(); this.brush = null; } if (this.modalContainer != null) { this.modalContainer.ExpandedStateChanging -= new CancelEventHandler(modalContainer_ExpandedStateChanging); this.modalContainer.Panel.Controls.Clear(); this.modalContainer.Dispose(); this.modalContainer = null; } } base.Dispose(disposing); }