Skip to content

Instantly share code, notes, and snippets.

@asimmon
Created March 3, 2016 04:35
Show Gist options
  • Save asimmon/54c84617bb9c6914f901 to your computer and use it in GitHub Desktop.
Save asimmon/54c84617bb9c6914f901 to your computer and use it in GitHub Desktop.
Demo ViewModel for Pillar that uses the navigation system
public class FirstViewModel : PillarViewModelBase
{
private readonly INavigator _navigator;
public FirstViewModel(INavigator navigator)
{
_navigator = navigator;
// Go to the second view after 5 seconds
GoToSecondViewModel();
}
public async void GoToSecondViewModel()
{
await Task.Delay(TimeSpan.FromSeconds(5));
await _navigator.PushAsync<SecondViewModel>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment