public StartUpPage() { this.InitializeComponent(); VM = ViewModel.ViewModel.getVM(); this.navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += this.NavigationHelper_LoadState; this.navigationHelper.SaveState += this.NavigationHelper_SaveState; }
public PivotPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Required; this.navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += this.NavigationHelper_LoadState; this.navigationHelper.SaveState += this.NavigationHelper_SaveState; VM = ViewModel.ViewModel.getVM(); this.DataContext = VM; visibility = false; //timerUser = new DispatcherTimer(); //timerLocations = new DispatcherTimer(); }
public static ViewModel getVM() { return VM ?? (VM = new ViewModel()); }