Questions tagged [displayalert]

6 questions
0
votes
1 answer

How can you DisplayAlert from a .NET Maui ContentView?

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),…
Cef
  • 661
  • 1
  • 6
  • 26
0
votes
1 answer

MAUI: NullReferenceException when DisplayAlert in Android Emulator

I have a .NET MAUI project and just want to display an alert. This already worked well, but in some cases it throws me a NullRefereceException. The Code is: private async void Info_Appearing(object sender, EventArgs e) { await…
0
votes
2 answers

Change the text color of Xamarin Forms Prompt Entry

I try to change the text color of the entry from a Xamarin Forms Prompt. I tried giving a default color for the Entry control in the App resource dictionary: I…
Gabriel Stancu
  • 940
  • 2
  • 13
  • 26
0
votes
2 answers

Xamarin Forms: DisplayAlert background tap firing the cancel event

I am using a DisplayAlert like below in my project. var answer = await DisplayAlert("Alert", "You are invited to join a group, would you like to accept it or not?", "Accept", "Reject"); if (answer) { //accept invitation } else { //reject…
Sreejith Sree
  • 3,055
  • 4
  • 36
  • 105
-1
votes
1 answer

Net 7 - How to get async function (which is called inside sync function) block the code execution until its done

I have the following function: public bool ShowMessageQuestion(string message) { var _result = Application.Current.MainPage.DisplayAlert("Test", message, "Yes", "No"); _result.Start(); return _result.Result; } The DisplayAlert is an…
anon
  • 13
  • 2
-1
votes
1 answer

xamarin ListView den id alma olayı

After long efforts, I managed to pull data from the api; When I compile and click on ListVeiw1 screen, I can't get ip or name, What is the solution? Thanks.