void InitializeComponent() { collapseButton = new PaddinglessButton(); collapseButton.Click += CollapseButton_Click; SplitterMoved += CollapsibleSplitContainer_SplitterMoved; }
/// <summary> /// Dispose controls resources. /// </summary> /// <param name="disposing"></param> protected override void Dispose(bool disposing) { if (disposing) { if (collapseButton != null) { collapseButton.Click -= CollapseButton_Click; collapseButton.Dispose(); collapseButton = null; } } base.Dispose(disposing); }