private async void UIElement_OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { ICategory activeCategory = (ICategory)((FrameworkElement)e.OriginalSource).DataContext; var editAccount = new EditCategory(activeCategory); var result = await editAccount.ShowAsync(); if (result == ContentDialogResult.Primary) { ViewModel.RefreshCategoryList(); } }
private async void AppBarButton_Click(object sender, RoutedEventArgs e) { var addAccount = new EditCategory(null, ViewModel.Category); var result = await addAccount.ShowAsync(); if (result == ContentDialogResult.Primary) { ViewModel.RefreshCategoryList(); } }