Skip to content

Instantly share code, notes, and snippets.

@fumiya-kume
Created August 16, 2016 18:52
Show Gist options
  • Save fumiya-kume/692c75016f7abdfecaf1a59c2a38fccc to your computer and use it in GitHub Desktop.
Save fumiya-kume/692c75016f7abdfecaf1a59c2a38fccc to your computer and use it in GitHub Desktop.
Prism を使っているUWP でハンバーガーパターンを使う方法
public sealed partial class MainPage : SessionStateAwarePage
{
public MainPageViewModel ViewModel => this.DataContext as MainPageViewModel;
public MainPage()
{
this.InitializeComponent();
DataContextChanged += (sender, args) =>
{
ViewModel.navigationService = new FrameNavigationService(
new FrameFacadeAdapter(ViewFrame),
s => Type.GetType(this.GetType().Namespace + $".{s}Page"),
new SessionStateService());
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment