private void OnLayoutAction(object sender, EventArgs e) { // If not disposed then we still have a element reference if (_ribbonTextBox != null) { // Change in selected tab requires a retest of the control visibility UpdateVisible(LastTextBox); } }