public model(viewModel view) { this.view = view; ran = new Random(); ce(); App.Current.Suspending += Current_Suspending; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter is viewModel) { view = e.Parameter as viewModel; DataContext = view; } else { view = new viewModel(); view.selectchange = selectchange; this.DataContext = view; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { view = e.Parameter as viewModel; }