protected void DoUpdate() { if (showData == true) { this.Size = new Size(this.Width, headingLabel.Height + detailTextBox.Height); } else { this.Size = new Size(this.Width, headingLabel.Height); } }