ContentDialog Window using WinUI 3
Hey, how can I create a standalone window that looks like the ConentDialog control?
I've attached examples from different places in Windows 11 where it's used. For instance the Microsoft Store uses it when installing an app, the Windows Firewall utilizes it and even the UAC Prompt.
TL;DR:
I want to create a window that functions as a dialog and looks similar to the ContentDialog control and the attached images.
The window should be able to adjust its content via startup arguments and return the user's decision (Yes or No) as the exit code.
2 Replies
For window sizing, you want something similar to WPF's Window.SizeToContent property, which appears to be possible via https://github.com/microsoft/microsoft-ui-xaml/discussions/9404. Then you can layout and position the content with Grids, StackPanels, etc. I recommend you check with #gui if you have specific issues.
Hey, thanks a lot for the reply!