Skip to content

WinUI3 - CommandBar - non consistent background style #10258

@mklemarczyk

Description

@mklemarczyk

Describe the bug

When using CommandBar on Windows 11 23H2. The style of background changes depending is "See more" button is pressed or not.
I created empty application and added only that control, the background is transparent if button "See more" is not clicked.
Style changes to different background and adds some border to it when button "See more is pressed".

I observed the same behavior in WinUI3 Gallery app. I should highlight that tests were performed in Hyper-V Virtual Machine with Windows, with animations disabled in Windows, and in Enhanced view of Virtual Machine.

I do not know if I should open that ticket in this repository or https://github.com/microsoft/WindowsAppSDK. It would be good that you provide more details in repository itself.

The same behavior I reproduced also on friend laptop to eliminate possibility of Hyper-V interference. So it does not matter if Windows is in VM or not. Problem occurs in both cases.

Steps to reproduce the bug

  1. Open WinUI3 Gallery app from Windows Store.
  2. Go to Menus & toolbars, than select CommandBar.
  3. Click "See More" button and observe change in behavior of background.

Expected behavior

The background should be kept to the style that is when button is not pressed. Pressing See more button should only change state of this button and show the flyout with more commands.

Screenshots

See more not clicked:
Image
See more clicked:
Image

NuGet package version

  • Microsoft.WindowsAppSDK - 1.7.241114004-experimental1

Windows version

Windows 11 (23H2): Build 22631

Additional context

My app is build for net9.0-windows10.0.22621.0
For WinUI3 app version 2.5.1.0.

Reopen from : #10242

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions