microsoft / microsoft/WindowsAppSDK

Scale property is not working properly in certain controls like ToolTip, Flyout etc.

Open
#4,830 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-WinUI
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

Describe the bug

If the Scale property is applied to a parent control of a popup, the popup does not adjust the size. When applying the transform/scale property to the popup, the popup becomes double scaled. This issue is found in ToolTip, Flyout etc.
If scaling is applied to the Combo Box, the drop-down popup is scaled but its alignment is not properly.

Steps to reproduce the bug

Sample project simulating the above scenario is attached (TestApp.zip).
TestApp.zip

  1. Open the Test Application solution in Visual Studio 2022
  2. Rebuild in Debug mode
  3. In TestApp, the Scale property is applied to parent control, then verify the controls are scaled except ToolTip, Flyout, CalendarView.
  4. Apply Scale to the ToolTip control.
  5. Verify the ToolTip is double scaled.
Expected behavior

No response

Screenshots

• Scale property is applied to parent control, the parent control is scaled according to the scaled value, But the popup is not scaled.
Image

• Scale Property is applied to ToolTip, the popup become double scaled.
Image

• Scale property is applied to parent control, the parent control is scaled according to the scaled value, But the Flyout is not scaled.
Image

• Scale property is applied to the Combo Box, Both Combo Box and drop-down popup is scaled but its alignment is not proper.
Image

• Scale property is applied to CalendarDatePicker control, the parent control is scaled according to the scaled value, But the popup is not scaled.
Image

NuGet package version

Windows App SDK 1.6.1: 1.6.240923002

Packaging type

Packaged (MSIX), Unpackaged

Windows version

Windows 10 version 22H2 (19045, 2022 Update)

IDE

Visual Studio 2022

Additional context

For the behavior mentioned above,
Is this the proper way to apply the Scale property to Xaml control?
Is there any solution or workaround to solve this issue?

Contributor guide

No contributing guide indexed for this repository

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

Open the attached TestApp.zip in Visual Studio 2022 and reproduce the scaling behavior for ToolTip, Flyout, ComboBox, and CalendarDatePicker. Compare scaling applied to the parent with scaling applied to the popup; done means the popups have the expected size and alignment without double scaling.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.