コード例 #1
0
        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;
        }
コード例 #2
0
 //Edit Button (AppBar)
 private async void AppBarButton_Click_1(object sender, RoutedEventArgs e)
 {
     Frame.Navigate(typeof(CreateWordBookPage), await WordBooksApiRequest.GetWordBook(BookId));
 }
コード例 #3
0
 protected async override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     VM = e.Parameter as WordCard;
     WordBookTitle.Text = (await WordBooksApiRequest.GetWordBook(VM.BookId)).Title;
 }