async void ShowLogin() { MessageDialog message = new MessageDialog(); var res = await message.ShowAsync(); if (res == ContentDialogResult.Secondary) { Application.Current.Exit(); } else if (res == ContentDialogResult.Primary) { if (await message.IsLogin()) { this.InitializeComponent(); HomeView home = new HomeView(); FrameMain.Navigate(home.GetType()); } else { ContentDialog Error = new ContentDialog(); Error.Title = "Sai mật khẩu"; Error.SecondaryButtonText = "OK"; var contentResult = await Error.ShowAsync(); if (contentResult == ContentDialogResult.Secondary) { ShowLogin(); } } } }