// Code to execute when a contract activation such as a file open or save picker returns // with the picked file or other return values private void Application_ContractActivated(object sender, Windows.ApplicationModel.Activation.IActivatedEventArgs e) { }
private async void RefreshUI(CoreApplicationView sender, Windows.ApplicationModel.Activation.IActivatedEventArgs args) { await SyncSideBarItemsUI(); CoreApplication.MainView.Activated -= RefreshUI; }
private async void RemoveEnumerateDrivesAsync(CoreApplicationView sender, Windows.ApplicationModel.Activation.IActivatedEventArgs args) { await RemoveLibrarySideBarItemsUI(); CoreApplication.MainView.Activated -= RemoveEnumerateDrivesAsync; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_ContractActivated(object sender, Windows.ApplicationModel.Activation.IActivatedEventArgs e) { ViewModel.HandleAppContractActivated(e); }
protected override async void OnActivated(Windows.ApplicationModel.Activation.IActivatedEventArgs args) { base.OnActivated(args); var activationService = Ioc.Default.GetService <IActivationService>(); await activationService.ActivateAsync(args); }
private void RemoveLibraryItems(CoreApplicationView sender, Windows.ApplicationModel.Activation.IActivatedEventArgs args) { RemoveLibrarySideBarItemsUI(); CoreApplication.MainView.Activated -= RemoveLibraryItems; }
private void ApplicationView_Activated(CoreApplicationView sender, Windows.ApplicationModel.Activation.IActivatedEventArgs args) { var window = CoreWindow.GetForCurrentThread(); window.Activate(); }
// Code to execute when a contract activation such as a file open or save picker returns // with the picked file or other return values private void Application_ContractActivated(object sender, Windows.ApplicationModel.Activation.IActivatedEventArgs e) { Debug.WriteLine("ContractActivated: " + e.ToString()); }