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:
<Style x:Key="PersonalInfoGridStyle" TargetType="{x:Type Grid}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=PersonalInfoGridVisibility}" Value="Collapsed">
<Setter Property="Grid.Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
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).
Can someone explain how I should go about this or if it's even possible? :) THANKS AHEAD