title: c# - hide field when changing another field
body: <p>I'm working in a lightswitch C# project.
  I'm trying to accomplish to make a field in a screen invisible when another (boolean) field in the same screen changes value. (without save or refresh)
  e.g. hide field Y when field X changes from "true" to "false".</p>
  
  <p>This is what I have now but only works when I refresh the screen an not immediately when changing the property of ItemX. </p>
  
  <pre><code>if (this.entity.itemX.value == true)
          {
              this.FindControl("itemY").IsVisible = false;
           }
          else
          {
              this.FindControl("ItemY").IsVisible = true;
           }
  </code></pre>
  
  <p>Any suggestions?</p>