private async void MainWindow_Loaded(object sender, RoutedEventArgs e) { await Utilities.GetImagesFromCloud(); _viewModel = new MainPageViewModel(); this.DataContext = _viewModel; }
protected override void OnActivated(EventArgs e) { if (_viewModel == null) { _viewModel = new MainPageViewModel(); this.DataContext = _viewModel; base.OnActivated(e); } }
protected override void OnActivated(EventArgs e) { _viewModel = new MainPageViewModel(); this.DataContext = _viewModel; base.OnActivated(e); }