Using the GridSplitter and StoryBoard element, you can easily set this. You may need to tweak this code a bit to make it look like a hamburger, but that should help you well.
<UserControl x:Class="Namespace.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="mainPage"> <Grid> <Grid.Resources> <Storyboard x:Name="CloseLeft"> <DoubleAnimation x:Name="animNavLinksClose" Storyboard.TargetName="mainPage" Storyboard.TargetProperty="NavLinksWidth" To="0.0" Duration="00:00:00.2" /> </Storyboard> <Storyboard x:Name="OpenLeft"> <DoubleAnimation x:Name="animNavLinksOpen" Storyboard.TargetName="mainPage" Storyboard.TargetProperty="NavLinksWidth" From="0" To="170" Duration="00:00:00.2" /> </Storyboard> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition Width="170" x:Name="NavLinksColumn" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid x:Name="grdNavLinks" Grid.Column="0"> </Grid> <GridSplitter x:Name="spltNavLinks" Grid.Column="1" /> <Grid x:Name="contentSection" Grid.Column="2"> </Grid> </Grid> </UserControl>
Then you can call your storyboard from code, as shown
// Begin Opening Animation OpenLeft.Begin(); // Begin Closing Animation CloseLeft.Begin();
source share