XF-Material-Library icon indicating copy to clipboard operation
XF-Material-Library copied to clipboard

Question about MaterialDialog

Open balaji830 opened this issue 4 years ago • 1 comments

I use MaterialDialog.Instance.ShowCustomContentAsync to show a more complex view. What I want to do is to attach validations to Confirmation Button such that, the dialog does not close until the validation errors are fixed. Is there a way to attach Validations to MaterialDialog Confirmation Button? Here is my example code var config = new MaterialInputDialogConfiguration() { CornerRadius = 8, BackgroundColor = Color.FromHex("#2c3e50"), InputTextColor = Color.White, InputPlaceholderColor = Color.White.MultiplyAlpha(0.6), TintColor = Color.White, TitleTextColor = Color.White, MessageTextColor = Color.FromHex("#DEFFFFFF") }; MyView.BindingContext = vm; bool? returnVal = await MaterialDialog.Instance.ShowCustomContentAsync(MyView, "Add Information", "Hello World", "Add", "Cancel", config); if (returnVal.Value) { await MaterialDialog.Instance.SnackbarAsync(message: "Selected: " + vm.Info1 + " " + vm.Info2, msDuration: MaterialSnackbar.DurationLong); }

balaji830 avatar Nov 13 '19 00:11 balaji830

Hello @balaji830 !

Considering that XF.Material uses Rg.Plugin.Popup you have access to directly their API's, so an possible workaround would be something like this:

PopupNavigation.Instance.PopAsyc()

To remove the last popup on the stack opened.

candidodmv avatar Aug 11 '20 17:08 candidodmv