microsoft / microsoft/microsoft-ui-xaml

SetPresenter() creates strange window with certain steps

Open
#10,509 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-AppWindow bug team-Core
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

AppWindow.SetPresenter() creates unmovable / small / maximized window.

### Steps to reproduce the bug

1. User maximizes window.
2. SetPresenter(AppWindowPresenterKind.Overlapped) or SetPresenter(AppWindowPresenterKind.Default)
3. Move() or Resize()
4. The window becomes strange.

**Reference information**
SetPresenter(OverlappedPresenter.Create()) / SetPresenter(AppWindowPresenterKind.CompactOverlay) is NOT a problem.

**Sample program**
https://github.com/shinta0806/TestSetPresenter

### Expected behavior

Normal overlapped window.

### Screenshots

![Image](https://github.com/user-attachments/assets/70afe6b9-3b92-4f1d-aa2a-609f2d535b9b)

### NuGet package version

WinUI 3 - Windows App SDK 1.7.1: 1.7.250401001

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

Perhaps the problem occurs when the same presenter is set more than once.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked TestSetPresenter sample and reproduce the sequence: maximize the window, call SetPresenter with Overlapped or Default, then Move or Resize. Compare this with OverlappedPresenter.Create() and CompactOverlay; done means the resulting overlapped window remains normal, movable, and correctly sized.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.