title: WPF controls visibility dont work
body: <p>I have a simple switch clause which should show/hide some controls and call a method. Very simple.
  Problem is that nothing happens. I'm a web developer and new to WPF. That's why I can't understand why the following doesn't work:</p>
  
  <pre><code>switch (_state)
  {
      case "ask":
          LabelAsk.Visibility = System.Windows.Visibility.Visible; //not working
          LabelSync.Visibility = System.Windows.Visibility.Hidden; //not working
          ButtonYes.Visibility = System.Windows.Visibility.Visible; //not working
          ButtonNo.Visibility = System.Windows.Visibility.Visible; //not working
          break;
      case "sync":
          LabelAsk.Visibility = System.Windows.Visibility.Hidden; //not working
          LabelSync.Visibility = System.Windows.Visibility.Visible; //not working
          ButtonYes.Visibility = System.Windows.Visibility.Hidden; //not working
          ButtonNo.Visibility = System.Windows.Visibility.Hidden; //not working
          ScanFolders();
          this.Close();
          break;
  }
  </code></pre>