PrismLibrary / Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..
Other
6.36k stars 1.64k forks source link

[BUG] Popup Dialog can't fullscreen and also DialogLayout.CloseOnBackgroundTapped not working. #3168

Open albilaga opened 5 months ago

albilaga commented 5 months ago

Description

I have problem with setup dialog as fullscreen page. As described in here the recommended way to use popups now is using IDialogService. But using IDialogService.ShowDialog have some problem which is:

  1. Can't set dialog as fullscreen. What I expecting is I want the popup to be fullscreen so I can dim the background by myself like this CleanShot 2024-06-19 at 10 32 20@2x but using IDialogService will be look like this CleanShot 2024-06-19 at 10 32 43@2x
  2. DialogLayout.CloseOnBackgroundTapped="True" looks like not working properly. I tap the gray area but it is not closing by itself

Steps to Reproduce

  1. Open this repo https://github.com/albilaga/PrismPopupsIssue
  2. Run it
  3. Compare Open Popup from Mopups and Open Popup from Dialog. Open Popup from Mopups can set the popup full screen but Open Popup from Dialogs can't.
  4. Open Popup from Dialog also can't close when background is tapped

Platform with bug

.NET MAUI

Affected platforms

iOS, Android

Did you find any workaround?

No response

Relevant log output

No response

thisisthekap commented 5 months ago

@dansiegel @brianlagunas Although this bug is quite new, it is blocking out MAUI migration. Can you shed some light on that?

brianlagunas commented 5 months ago

Unfortunately, we are working on other things and do not have time to look into this yet. The good news is that the IDialogService is part of the Prism Maui code base here: https://github.com/PrismLibrary/Prism/tree/master/src/Maui/Prism.Maui/Dialogs

Feel free to look around until we have time to look into it.

thomasgalliker commented 5 months ago

I was struggling with the same/similar problem. Since we have to migrate from XF to MAUI now, I couldn‘t wait and created a MAUI-compatible dialog plugin for prism. Similar to what was there in prism for Xamarin. As soon as prism has fullscreen dialogs, I‘ll get rid of this nuget.

Thanks for all the good effort!

thisisthekap commented 5 months ago

@thomasgalliker Thank you for that! We appreciate your effort! We will let you know once we successfully integrated your library! 😄

Victor-Porter commented 3 months ago

DialogLayout.CloseOnBackgroundTapped bug reproduced also in Windows platform.