private async void Button_Click(object sender, RoutedEventArgs e) { SubmitDataProgress.IsActive = true; if (IsNewCard) { await WordCardsApiRequest.AddWordCard(VM); Frame.Navigate(typeof(WordCardItems), await WordBooksApiRequest.GetWordBook(VM.BookId)); } else { await WordCardsApiRequest.UpdateWordCard(VM.Id, VM); Frame.Navigate(typeof(WordBookItems)); } SubmitDataProgress.IsActive = false; }
//Edit Button (AppBar) private async void AppBarButton_Click_1(object sender, RoutedEventArgs e) { Frame.Navigate(typeof(CreateWordBookPage), await WordBooksApiRequest.GetWordBook(BookId)); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); VM = e.Parameter as WordCard; WordBookTitle.Text = (await WordBooksApiRequest.GetWordBook(VM.BookId)).Title; }