protected override void OnNavigatedTo(NavigationEventArgs e) { if (PTTFrame.CurrentSourcePageType != typeof(LoginPage)) { if (!LiPTT.Client.IsConnected) { PTTFrame.Navigate(typeof(LoginPage)); } } }
public PttMainPage() { this.InitializeComponent(); LiPTT.Frame = PTTFrame; LiPTT.Client.Kicked += async(o, e) => { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { PTTFrame.Navigate(typeof(LoginPage)); }); }; }