microsoft / microsoft/microsoft-ui-xaml

App crashes when resizing window to small size with PipsPager inside Viewbox

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

Description

### Describe the bug

The WinUI 3 application crashes with an unhandled ArgumentException when dynamically resizing the application window to a small size. The crash only occurs when a PipsPager control is nested inside a Viewbox.
The application runs normally at normal window size on startup. However, while dragging the window border to shrink the window to a relatively small size, the layout recalculation triggered by window resize causes an internal layout exception in PipsPager.MeasureOverride, resulting in a full app crash.

### Steps to reproduce the bug

1. Create a new WinUI 3 packaged project (Windows App SDK).
2. Add a Viewbox containing a standard PipsPager control in XAML.
3. Build and run the application; the UI loads normally without any startup crash.
4. Drag the window border to manually shrink the window to a small size.
5. The application crashes immediately during the window layout update.

### Expected behavior

PipsPager should correctly handle dynamic layout size changes from the parent Viewbox. It should scale down normally with the window, gracefully adapt to small available size constraints, and never throw an exception or crash the application during window resizing.

### Screenshots

// Test xaml code:

































### NuGet package version

Windows App SDK version: 2.1.3

### Packaging type

Packaged (MSIX)

### Windows version

_No response_

### IDE

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the packaged Windows App SDK 2.1.3 project with a PipsPager nested in a Viewbox, then inspect the PipsPager.MeasureOverride path during window resizing. Done means the sample can be resized to a small window without an ArgumentException or application crash, while the PipsPager adapts to the available size.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.