Good dialogs should only show appropriate options. For example Power Management settings should only be available when Power Management is enabled, or when Power Management is selected to be enabled when the dialog is closed.
Data binding provides us with a elegant solution for such dialog conditioning. Simply place all conditional controls (in this case power management settings controls) in to a panel (pnlPMSetting). Data bind the Enabled property of the panel to the Checked property of the enabler control (ckUsePM).
pnlPMSettings.DataBindings.Add(“Enabled”, ckUsePM, “Checked”);