protected override void OnNavigatedFrom(NavigationEventArgs e) { base.OnNavigatedFrom(e); streamerObject.OnNavigatedFrom(); streamerObject.StreamerObjectErrorEvent -= streamerObject_StreamerObjectErrorEvent; Application.Current.Suspending -= Current_Suspending; Application.Current.Resuming -= Current_Resuming; }
protected override async void OnNavigatedFrom(NavigationEventArgs e) { base.OnNavigatedFrom(e); streamerObject.OnNavigatedFrom(); if (chatWindow.client.isConnectedToChannel) { await chatWindow.client.SendPart(); } streamerObject.StreamerObjectErrorEvent -= streamerObject_StreamerObjectErrorEvent; Application.Current.Suspending -= Current_Suspending; Application.Current.Resuming -= Current_Resuming; }