Answer the question
In order to leave comments, you need to log in
Hamburger menu not opening?
Hello, I am trying to implement gamb. menus don't break MVVM rules.
Here is the menu XAML code:
<Button x:Name="HamburgerButton"
RelativePanel.AlignLeftWithPanel="True"
FontFamily="Segoe MDL2 Assets"
FontSize="36"
Content=""
Command="{Binding PaneOpenCommand}"/>
<TextBlock Name="TitleTextBlock"
RelativePanel.RightOf="HamburgerButton"
FontSize="28"
FontWeight="Bold"
Margin="30 5 0 0" />
<SplitView Name="mySplitView" Grid.Row="1" OpenPaneLength="200" IsPaneOpen="{Binding IsPaneOpened}">
<SplitView.Pane>
<ListBox SelectionMode="Single" >
<ListBoxItem Name="home">
<TextBlock FontSize="24" Text="Главная" />
</ListBoxItem>
<ListBoxItem Name="share">
<TextBlock FontSize="24" Text="Поделиться" />
</ListBoxItem>
<ListBoxItem Name="settings">
<TextBlock FontSize="24" Text="Настройки" />
</ListBoxItem>
</ListBox>
</SplitView.Pane>
</SplitView>
private bool isPaneOpened;
public bool IsPaneOpened
{
get
{
return isPaneOpened;
}
set
{
SetProperty(ref this.isPaneOpened, value);
}
}
public ICommand PaneOpenCommand
{
get
{
return new Command(PaneOpening);
}
}
private void PaneOpening()
{
IsPaneOpened = !IsPaneOpened;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question