microsoft / microsoft/microsoft-ui-xaml

titlebar customization and AppWindowPresenterKind.FullScreen crashes winforms app

Open
#10,451 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

when trying to enter full screen using the API, i keep experiencing crash on my packaged winforms app (with windowsappsdk nuget installed).

other modes such as `Default`, `CompactOverlay`, etc work just fine.

### Steps to reproduce the bug

1. create winforms app
2. setup to use windows app sdk
3. create msix installer project and reference the winforms app
4. create a button
```cs
// in the form.
AppWindow GetAppWindow()
{
return AppWindow.GetFromWindowId(
Win32Interop.GetWindowIdFromWindow(this.Handle));
}

// in the button.
GetAppWindow().SetPresenter(AppWindowPresenterKind.FullScreen);
```

### Expected behavior

no crash

### Screenshots

_No response_

### NuGet package version

Windows App SDK 1.6.6: 1.6.250228001

### Packaging type

Packaged (MSIX)

### Windows version

Windows 11 version 24H2 (22621, October 2024 Update)

### IDE

Visual Studio 2022

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. First reproduce the crash in the packaged WinForms app using AppWindowPresenterKind.FullScreen and capture the failure details; done means the same call enters full screen without crashing on the reported Windows App SDK and Windows version.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.