private async void SubmitOnClick(object sender, RoutedEventArgs e) { try { EmailTextBox.ClearValue(TextBox.BorderBrushProperty); PasswordTextBox.ClearValue(TextBox.BorderBrushProperty); await ApiClient.Instance.PostLoginAsync(LoginViewModel); EventViewModel = await ApiClient.Instance.GetEventsFromBusinessFromJWTAsync(); PromotionViewModel = await ApiClient.Instance.GetPromotionsFromBusinessFromJWTAsync(); CreatePromotionNotification(); CreateEventsNotification(); Frame.Navigate(typeof(PlacesView)); this.Frame.BackStack.Clear(); } catch (Exception ex) { Console.WriteLine(ex); Notification.Show(5000); EmailTextBox.BorderBrush = new SolidColorBrush(Colors.Red); PasswordTextBox.BorderBrush = new SolidColorBrush(Colors.Red); LoginViewModel.Email = ""; } }