microsoft / microsoft/microsoft-ui-xaml
Proposal: Set owner for Microsoft.UI.Xaml.Window
Open
Nobody has claimed this yet.
area-XamlWindow
feature proposal
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
Summary
Allow to set an owner window for a Microsoft.UI.Xaml.Window by providing an owner WindowId, analog to AppWindow.Create() functionality.
Rationale
- Allows to create modal/dialog windows in WinUI 3
- Ensures feature parity with traditional Win32 window and
AppWindowbehavior - Ensures feature parity with other UI frameworks like WPF
- Avoid use of the discouraged
SetWindowLongPtr(GWL_HWNDPARENT)API
Scope
| Capability | Priority |
|---|---|
Allow to set owner window for Microsoft.UI.Xaml.Window during construction |
Must |
Important Notes
Example API
public Window();
public Window(WindowId ownerWindowId);
Also see https://github.com/microsoft/WindowsAppSDK/discussions/3680.
Open Questions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Microsoft.UI.Xaml.Window construction API and compare the requested owner WindowId behavior with AppWindow.Create(). Resolve the open ownership and constructor questions, then add coverage for creating a modal or dialog window with an owner. Done means ownership works without SetWindowLongPtr(GWL_HWNDPARENT).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100