private void CategoryContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (string.IsNullOrEmpty(txtCategoryName.Text) || string.IsNullOrWhiteSpace(txtCategoryName.Text)) { args.Cancel = true; txtCategoryName.PlaceholderText = AppConstants.AppMessages[AppConstants.UsedLanguage]["category_content_dialog_error"]; } else { args.Cancel = false; if (_category == null) { _categoryCaption = txtCategoryName.Text; _return = CategoryContentDialogReturn.CategoryAdd; } else { _category.c_caption = txtCategoryName.Text; _return = CategoryContentDialogReturn.CategoryEdit; } } }
private void CategoryContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { _return = CategoryContentDialogReturn.Cancel; }