I want to open and close the splitview.pane with commands. This is my sample xaml-code:
<SplitView Name="AppNavigation" DisplayMode="CompactOverlay" IsPaneOpen="False" CompactPaneLength="50" OpenPaneLength="200">
<SplitView.Pane>
<Button Name="Hamburger" FontFamily="Segoe MDL2 Assets" Content="" FontSize="24" Width="50" Height="50" Command="{Binding HamburgerExecute}" />
</SplitView.Pane>
</SplitView>
I use a RelayCommand class and call these two methods:
private bool HamburgerCanExecute(object obj)
{
return true;
}
private void HamburgerExecute(object obj)
{
AppNavigation.IsPaneOpen = !AppNavigation.IsPaneOpen; // this doesn't work
}
Can someone explain to me how I use commands to change xaml properties?