Introduce PopupAsync on UserControl/Form
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
## Rationale
Since Windows 8, Windows introduced a popup-like Dialog for imfo messages or short input actions, which gets dismissed _just_ by clicking next to the Dialog. With that, it has a classic popup (menu) behavior.
Like this:

Currently, there are no means to utilize these kinds of Dialogs in WinForms. Together with #5917 and #4631, this API is not only an important extension for programming with the typical .NET async/await pattern - it also solves 2 requirements in modern, desktop UI design:
1. It makes Windows 8, 10, 11-typical popup-like Dialogs possible.
2. It is an easy extension for Popup-Controls which custom content.
### Proposed APIs:
```cs
var popupResult = await UserControl1.PopupAsync([IWin43Window owner]);
```
To show a UserControl in a popup-like Dialog style.
```cs
var popupResult = await UserControl1.PopupAsync(popupInitiateControl control);
```
To show a UserControl as a real popup to a parent control (like a TextBox with an attached down button to open the popup context). In this case, we should provide functionality, to attach the popup visually in a meaningful way to the parent control, to give the visual impression of both UI parts as a unit.
Contributor guide
Assessment
This issue has not been assessed yet.