public MainPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Required; App.Current.Suspending += async(o, e) => await client.DeactivateAsync(); dispatcher = CoreWindow.GetForCurrentThread().Dispatcher; localSettings = ApplicationData.Current.LocalSettings; InitializeEngine(); InitializeUI(); }
private async void Page_Unloaded(object sender, RoutedEventArgs e) { await client.DeactivateAsync(); }
private void Page_Unloaded(object sender, RoutedEventArgs e) { server.Deactivate(); client.DeactivateAsync(); }