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 near top of window opens up, causes clipping #1024

Closed
YuliKl opened this issue Jul 9, 2019 · 6 comments
Closed

CommandBar near top of window opens up, causes clipping #1024

YuliKl opened this issue Jul 9, 2019 · 6 comments
Labels
area-Commanding AppBar, UICommand, MVVM, etc bug Something isn't working needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) no-issue-activity team-Controls Issue for the Controls team

Comments

@YuliKl
Copy link

YuliKl commented Jul 9, 2019

Describe the bug

CommandBar appears to always open upward, whether or not there is space to do so.

Steps to reproduce the bug

  1. Create a new blank app with
    <Grid>
        <CommandBar>
            <AppBarButton Icon="Delete" Label="Delete"/>
            <AppBarButton Icon="Save" Label="Save"/>
        </CommandBar>
    </Grid>
  1. Run the app
  2. Click on More button

Expected behavior

CommandBar opens downward.

Screenshots

Closed CommandBar:
image

Opened CommandBar:
image

Version Info

NuGet package version:

N/A. Targetting 18362 SDK.

Windows 10 version Saw the problem?
Insider Build (18916) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

@msft-github-bot msft-github-bot added this to Needs triage in Controls Triage Jul 9, 2019
@jevansaks jevansaks added area-Commanding AppBar, UICommand, MVVM, etc bug Something isn't working needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) labels Jul 11, 2019
@jevansaks jevansaks moved this from Needs triage to Backlog in Controls Triage Jul 11, 2019
@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
@hansmbakker
Copy link

hansmbakker commented Oct 25, 2020

This is not only a problem when it is at the top of the page. It also makes it impossible to vertically center CommandBar.Content elements, and it produces an ugly gap below the buttons.

There is a 4px shift up of all elements inside the CommandBar when IsOpen switches to true, and I believe this is a bug.

The issue is not in WinUI; it is in the UWP SDK, but since this is the only place where we can report XAML bugs, we post it here (thanks @YuliKl for the initial post).

The issue is still there on the newest Windows 10 builds (19042).

More details (including gif screen recordings) in https://stackoverflow.com/questions/64524669/uwp-commandbar-moves-vertically-when-isopen-changes.

Bug repro repository at https://github.com/hansmbakker/CommandBar.BugRepro

@hansmbakker
Copy link

hansmbakker commented Oct 25, 2020

CommandBar shifts and grows when positioned at page bottom:

CommandBar-bug

CommandBar shifts and will be cropped when positioned at page top (as reported by @YuliKl):

CommandBar-bug-top

Vertical content centering is not possible

CommandBar-bug-verticallyalign

and in all cases you get the ugly gap below the buttons.

Is there any workaround?

@hansmbakker
Copy link

For me, there is a workaround shared by @v-zhumin on StackOverflow:

<AppBarSeparator Height="40"/>

That one worked for me.

However, I see that @YuliKl did not use AppBarSeparator, so for her it must be caused by something else?

Can you pick this up and solve the bug so that the workaround is not needed anymore?
Can you investigate what other causes there might be?

@kmgallahan
Copy link
Contributor

kmgallahan commented Oct 26, 2020

@hansmbakker

I believe you are running into the same issue described in #1454, although I didn't check using your repro.

@hansmbakker
Copy link

I believe you are running into the same issue described in #1454, although I didn't check using your repro.

@kmgallahan
Please check my repro, because although there is similarity, there are really differences as well.

I am not using scaled text for example, which the issue you mention is about.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Commanding AppBar, UICommand, MVVM, etc bug Something isn't working needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) no-issue-activity team-Controls Issue for the Controls team
Projects
No open projects
Development

No branches or pull requests

4 participants