Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DisplayAlert does not works in Windows, does in Android #9469

Closed
geertgeerits opened this issue Aug 16, 2022 · 7 comments
Closed

DisplayAlert does not works in Windows, does in Android #9469

geertgeerits opened this issue Aug 16, 2022 · 7 comments
Labels
area/controls 🎮 Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area/shell 🐢 Shell Navigation, Routes, Tabs, Flyout control-dialogalert DisplayAlert, dialog platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@geertgeerits
Copy link

Description

In Windows no DisplayAlert box.

Steps to Reproduce

  1. Run the application in Android, you will see the DisplayAlert box.
  2. Run the application in Windows, there is no DisplayAlert box.

GitHub:
https://github.com/geertgeerits/MauiAppTestDisplayAlert

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11

Did you find any workaround?

No

Relevant log output

No response

@geertgeerits geertgeerits added the t/bug Something isn't working label Aug 16, 2022
@PureWeen
Copy link
Member

@geertgeerits for now can you use Loaded to fire your displayalert code

@PureWeen PureWeen added this to the Backlog milestone Aug 16, 2022
@ghost
Copy link

ghost commented Aug 16, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost ghost added the area/controls 🎮 Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Aug 17, 2022
@jsuarezruiz jsuarezruiz added the area/shell 🐢 Shell Navigation, Routes, Tabs, Flyout label Aug 22, 2022
@angelru
Copy link

angelru commented Sep 1, 2022

None of the alerts work in windows

@angelru
Copy link

angelru commented Sep 2, 2022

@PureWeen what do you mean by Loaded?

@PureWeen
Copy link
Member

PureWeen commented Sep 2, 2022

@geertgeerits for your code here

https://github.com/geertgeerits/MauiAppTestDisplayAlert/blob/master/MauiAppTestDisplayAlert/MainPage.xaml.cs#L14

If you just use
this instead of the MainPage does that work?

@angelru
Copy link

angelru commented Sep 2, 2022

@geertgeerits for your code here

https://github.com/geertgeerits/MauiAppTestDisplayAlert/blob/master/MauiAppTestDisplayAlert/MainPage.xaml.cs#L14

If you just use this instead of the MainPage does that work?

it does not work

@PureWeen
Copy link
Member

PureWeen commented Sep 2, 2022

This looks like it will be fixed with .NET 7

Code running on .NET7

image

For now if you move the call to the Loaded event that should achieve your desired result

Code running on current stable .NET6

image

@PureWeen PureWeen closed this as completed Sep 2, 2022
@dotnet dotnet locked as resolved and limited conversation to collaborators Oct 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/controls 🎮 Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area/shell 🐢 Shell Navigation, Routes, Tabs, Flyout control-dialogalert DisplayAlert, dialog platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants