Created
March 3, 2016 04:35
-
-
Save asimmon/54c84617bb9c6914f901 to your computer and use it in GitHub Desktop.
Demo ViewModel for Pillar that uses the navigation system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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