microsoft / microsoft/microsoft-ui-xaml

ItemsView crashes on DPI change (0xC000027B in Microsoft.UI.Xaml.dll)

Open
#11,129 4 comments 0 reactions 0 assignees View on GitHub
area-ItemsView bug Crash
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

An application may crash in Microsoft.UI.Xaml.dll when a DPI change occurs on a page using ItemsView.
The exception code is 0xC000027B (Stowed Exception).

In the WinUI3 Gallery (version 2.9.0.0), this issue occurs every time on the ItemsView page.

The same type of crash has also been observed in an application currently under development when using ItemsView,
however, it occurs infrequently. At this time, the only scenario where the issue can be reproduced consistently
is the ItemsView page in the WinUI3 Gallery.

### Steps to reproduce the bug

1. Launch WinUI3 Gallery
2. Open the "ItemsView" page
3. Drag the window to a display with a different DPI setting
(e.g., from 100% to 150%)
4. The application crashes when the DPI change occurs

### Expected behavior

The application should continue running without crashing when the DPI changes.

### Screenshots

_No response_

### NuGet package version

2.1.3 / 1.8.260508005

### Packaging type

Unpackaged

### Windows version

Windows 11 version 24H2 LTSC (26100, June Update)

### IDE

Visual Studio 2022

### Additional context

- Windows version: Windows 11 25H2(26200.8457)
- IDE: Visual Studio 2022 / Visual Studio 2026
These versions could not be selected in the bug report form, so they are provided here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the crash in the WinUI3 Gallery's ItemsView page while moving the window between displays with different DPI settings. Use the reported Microsoft.UI.Xaml.dll exception and the listed Windows and package versions to investigate; done means the page no longer crashes during a DPI change.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.