Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandBar not respecting Fluent sizing #9260

Open
danmartinez opened this issue Apr 30, 2022 · 4 comments
Open

CommandBar not respecting Fluent sizing #9260

danmartinez opened this issue Apr 30, 2022 · 4 comments
Labels
bug Something isn't working team-Controls Issue for the Controls team

Comments

@danmartinez
Copy link

Describe the bug
The CommandBar height defaults to 48px when using WinUI 2 styles instead of 40px as described in this documentation. Uncertain whether this is expected behavior.

Steps to reproduce the bug

  1. Created a new project from the "Blank App (C++/WinRT)" template.
  2. Gutted the default contents and replaced with:

App.xaml

<Application
    x:Class="CommandBarTest.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CommandBarTest">
    <Application.Resources>
        <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
    </Application.Resources>
</Application>

MainPage.xaml

<Page...>
    <Grid>
        <CommandBar DefaultLabelPosition="Right">
            <AppBarButton Icon="Back" Label="Back"/>
        </CommandBar>
    </Grid>
</Page>

Expected behavior

  • Without WinUI library styling, CommandBar height is 40px.
  • With WinUI library styling, CommandBar height is 40px.
  • With WinUI Compact styling, CommandBar height is 32px.

Actual behavior

  • (Without WinUI library styling, CommandBar height is 40px as expected.)
  • With WinUI library styling, CommandBar height is 48px.
  • With WinUI Compact styling, CommandBar height is 48px.

Note that AppBarButtons do size to a height of 32px, but there is space added above and below them.

Windows version:

  • Windows 11 (22000)

Device form factor:

  • Desktop
@gregwoo-microsoft gregwoo-microsoft added the bug Something isn't working label May 3, 2022
@gregwoo-microsoft
Copy link

Thanks for pointing this out @danmartinez. I will double-check with our design team to be sure and come back to this thread when I have an update.

@Jay-o-Way
Copy link
Contributor

@gregwoo-microsoft was the design team busy?

@karkarl karkarl transferred this issue from microsoft/WinUI-Gallery Jan 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 18, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@bpulliam bpulliam added team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jan 22, 2024
@Jay-o-Way
Copy link
Contributor

Maybe @niels9001 knows more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants