Discussion: Should ContentDialog in a Desktop WinUI 3 app create a modal top-level window?
See original GitHub issueToday, the ContentDialog is just XAML content placed on the top of the visual tree. In WPF, ContentDialog is like a MessageBox, which is a modal top-level child window.
Discussion: Should the ContentDialog pivot towards a modal top-level child window?
In this way, ContentDialog won’t need XamlRoot anymore. There are several customer complains that the need of XamlRoot is unintuitive for WPF/Win32 developers (e.g. #2504)
There are several questions that need to be answer:
- What parent XAML Window will host the ContentDialog top-level child window. Desktop WinUI 3 apps can have multiple Window objects in the same thread. So, do we need new APIs? For example:
contentdialog.ShowAsync(mywindow);
-
How will the new top-level child ContentDialog work with the RequestedTheme feature?
-
Will the new ContentDialog work in XAML Islands scenarios? Will be still needed XamlRoot for Islands?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:35 (17 by maintainers)
Top Results From Across the Web
Dialog controls - Windows apps
Dialog controls are modal UI overlays that provide contextual app ... Open the WinUI 3 Gallery app and see the ContentDialog in action....
Read more >winui 3 - Modal dialog in WinUI3 application
I'm new to WinUI3. I'm trying to create a modal dialog using ContentDialog class, but the async nature confuses me. Suppose, there is...
Read more >A Dialog Service for WinUI 3 | XAML Brewer, by Diederik Krols
I this article we build an MVVM DialogService in a WinUI 3 Desktop application. It comes with the following features: Message Dialog, ...
Read more >Query English Language Learners
... 'windows-forms-core', 'windows-virtual-desktop', 'window-width', 'winget', 'winston-elasticsearch', 'winsw', 'wintun', 'winui-3', ...
Read more >Untitled
A deep-dive into WinUI 3 in desktop apps - Windows Blog ContentDialog no Windows 10 UWP - YouTube Teaching tips - Windows apps...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not directly related, but perhaps relevant for the future… #885 #2313 (My own Task Dialog proposal)
Whatever modal top-level window is coded/designated for this - could it be extended to other future modal control proposals?
There was a topic about looking at Content Dialog dismissal behaviour #2122 which perhaps could be a behaviour property of the ContentDialog.
That way it could render within the window with Light Dismiss. Include as default, the current behaviour, and add a ModalWindow option, which will create a movable window with only a Close button, or Close and Minimise.