0

I am trying to do something similar to:

await DisplayAlert("Alert", "You have been alerted", "OK");

The issue is the button that is triggering this is on a ContentView, not a ContentPage. I understand why it is not available on the view (sort of), but there must be a way to trigger an alert dialogue if your UI object is part of a view I would think.

Any ideas?

Thanks.

Cef
  • 661
  • 1
  • 6
  • 26

1 Answers1

1

Use

App.Current.Mainpage.DisplayAlert(…);
Jason
  • 86,222
  • 15
  • 131
  • 146