microsoft / microsoft/microsoft-ui-xaml

CommandBar is always displaying the "see more" button when text scaling is on

Open
#10,117 2 comments 0 reactions 1 assignee Claimed by @godlytalias View on GitHub
area-Commanding bug product-winui2
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

When text scaling is on, the `CommandBar` control is always displaying its "see more" button whereas there is no content in the overflow menu.

### Steps to reproduce the bug

1. Add the following XAML to an UWP application:
```xml




```

2. From Windows' settings, set text scaling to 200%
3. Run the application
4. Ensure the app window is large enough to display all the buttons.
5. The "see more" button is visible whereas there is nothing in the overflow menu
![CommandBar displaying its overflow button when text scaling is on](https://github.com/user-attachments/assets/64f405c8-f0f3-4a8b-b7ab-cb6988fe3af8)

6. Clicking on the button increases the command bar's height.
![CommandBar displaying its overflow button when text scaling is on](https://github.com/user-attachments/assets/cd075cc7-6643-4b07-8414-1059493d0994)

### Expected behavior

The `CommandBar` control should keep the same behavior as when text scaling is disabled.
The "see more" button should only be displayed when there are items in overflow or secondary commands.

The same command bar with text scaling off:
![CommandBar with text scaling off](https://github.com/user-attachments/assets/69a57f18-b593-4973-ae0f-34b4120582ce)

### Screenshots

_No response_

### NuGet package version

WinUI 2 - Microsoft.UI.Xaml 2.8.2

### Windows version

Windows 11 (22H2): Build 22621

### Additional context

Could be related to #9299

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.