title: In WPF, how do I set a button's click event to change a grid's visibility?
body: <p>I'm trying to set a button's event to change a grid's visibility using just XAML. I'm pretty sure I should be using an EventTrigger, but I couldn't get that to work so my most recent attempt is to create a DataTrigger that is bound to a field in the view-model:</p>
  
  <pre><code>&lt;Style x:Key="PersonalInfoGridStyle" TargetType="{x:Type Grid}"&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding Path=PersonalInfoGridVisibility}" Value="Collapsed"&gt;
              &lt;Setter Property="Grid.Visibility" Value="Collapsed"/&gt;
          &lt;/DataTrigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>The above code isn't working, but that matters less to me that achieving the whole thing in just XAML (without using the view-model or code-behind).</p>
  
  <p>Can someone explain how I should go about this or if it's even possible? :) THANKS AHEAD</p>