Skip to content

AppWindow sizing on zoomed screen #10498

@LucaCris

Description

@LucaCris

Describe the bug

If a Windows screen is not at 100% zoom, MoveAndResize has unexpected behavior.

Steps to reproduce the bug

Place a WinUI-3 window (wrapped on new AppWindow) on a screen with resolution different from 100%, ie: 150%.

Read its size via AppWindow.Size property. For example the result is 800x600.

Set 800x600 as rect size in AppWindow.MoveAndResize()

The window is now bigger.

Re-read size: the result is 1200x900 (150% of expected).

Expected behavior

Scaling both get and set or never scale size.

Screenshots

No response

NuGet package version

1.1.1

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

High severity for Apps that must save last window position (also for extra app windows).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions