title: Get checkBox unchecked state
body: <p>I need to implement a check box to switch between two methods enabling/disabling some control. I am using the following code, I tried also in other ways but no luck.</p>
  
  <pre><code>  private void checkBox1_CheckedChanged(object sender, EventArgs e)
          {
  
                  if (checkBox1.Checked)//this is working
                  {
                      trackBar2.Enabled = false;
                      button3.PerformClick();
                      textBox8.Enabled = true;
                  }
  
              else// this is supposed to work if checkbox is unchecked but doesn't work
              {
                  trackBar2.Enabled = true;
                  textBox8.Enabled = false;
              }
          }
  </code></pre>
  
  <p>The result I get is always the same. If I check the checkbox the first condition is meet and it is fine. If I uncheck the text box, nothing happen and does not go back to the first condition either.
  How can I detect the checked/unchecked condition?</p>