Popup not getting displayed

Shiva799Shiva799 Member ✭✭

i have to show popup when a condition is not met.
i'm using device.begininvoke method to call the popup but its not working Only for this exception its not working

BaseViewModel
public void DisplayAlert(InfoDialogData dialogData, InfoDialogButtonData dialogButtonData) { IsPopupShown = true; AlertDialogViewModel alertDialog = new AlertDialogViewModel() {Data = dialogData,Button = dialogButtonData}; Device.BeginInvokeOnMainThread(() => { Navigation.PushPopupAsync(new AlertDialog(alertDialog)); }); }
ViewModel
`if{
//something here
}
else
{

DisplayAlert(new InfoDialogData
{
//Initialization
},

new InfoDialogButtonData
{
//Initialization
}
);
});
}`

Best Answer

Answers

Sign In or Register to comment.