Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] CommandBar content does not fill vertical space and shifts up when more (···) button is clicked #9042

Open
velocitysystems opened this issue Dec 29, 2019 · 16 comments

Comments

@velocitysystems
Copy link

velocitysystems commented Dec 29, 2019

Description

Content in the command bar ie. ToolBar item icons do not fill the available vertical space.
When the more (···) button on the toolbar is clicked, the content in the CommandBar shifts up.
Note: Only occurs when targeting UWP platforms > 16299.

May be related to #5661.

Steps to Reproduce

  1. Create a blank Xamarin.Forms sample project with a UWP target.
  2. Update to Xamarin.Forms 4.4.0 (vLatest) and target > 16299.
  3. Add a page with one or more toolbar items.
  4. Run the project on UWP and click the more (···) button.

Expected Behavior

The command bar should expand but not shift upward.

Actual Behavior

The command bar expands and shifts upward.

Basic Information

Screenshots

Before
Screen Shot 2019-12-29 at 1 48 29 PM

After
Screen Shot 2019-12-29 at 1 48 37 PM

Reproduction Link

ToolbarIconSample.zip

@velocitysystems velocitysystems added s/unverified New report that has yet to be verified t/bug 🐛 labels Dec 29, 2019
@velocitysystems
Copy link
Author

@jfversluis Hi Gerald. Do you know if this issue is fixed with #8625?

@jfversluis
Copy link
Member

@velocitysystems it might be! I've created a new build of that PR on top of master, you should be able to download the NuGet here: https://dev.azure.com/xamarin/public/_build/results?buildId=11995&view=artifacts&type=publishedArtifacts

Would you be able to try it?

@velocitysystems
Copy link
Author

@velocitysystems it might be! I've created a new build of that PR on top of master, you should be able to download the NuGet here: https://dev.azure.com/xamarin/public/_build/results?buildId=11995&view=artifacts&type=publishedArtifacts

Would you be able to try it?

Thanks @jfversluis. I updated the repro project to use your NuGet artifact, however I get errors when trying to build as the .nupkg appears to be missing UWP payload files?
Screenshot 2019-12-30 at 10 15 56 am

@hartez hartez self-assigned this Jan 3, 2020
@hartez hartez added e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Jan 3, 2020
@hartez hartez removed their assignment Jan 3, 2020
@apwillies
Copy link

We are seeing this on UWP too. Thanks in advance.

@velocitysystems velocitysystems changed the title [Bug] CommandBar content shifts up when more (···) button is clicked [Bug] CommandBar content does not fill vertical space and shifts up when more (···) button is clicked Jan 11, 2020
@velocitysystems
Copy link
Author

@jfversluis Hi Gerald, just wondering if you possibly have any update on this? A number of of our UWP users are reporting it and it’s a little ugly to be sure. Thanks!

@jfversluis
Copy link
Member

Unfortunately, I don't have any update to share at this moment, sorry about that. Is there anything from your side that you have discovered in the meantime that could help us get to the cause of this?

@JesseLiberty
Copy link

Confirmed that this still happens with Xamarin.Forms version 4.40.991265, Windows 10 version 1903. Check of web shows no fix for this yet

@velocitysystems
Copy link
Author

Bump. Any possible updates on this?

@YZahringer
Copy link
Contributor

Allow visibility configuration of Overflow button would be a solution? #10885

@anpin
Copy link

anpin commented Jun 28, 2020

Allow visibility configuration of Overflow button would be a solution? #10885

I would agree on this because on Android and iOS ToolbarItems / CommandBaritems are fully shown (despite the fact that target devices will usually have smaller screens). This is especially annoying if you need to port an existing app to UWP and the app has many pages with toolbar items with text only which will not be shown until you press the (···) button.

@pwillies
Copy link

@samhouts @PureWeen @hartez @jfversluis Hi XF Team, This is on our priority list too. It's also visual, but it affects every view in the app and looks very amateurish. It was reported back in December 2019.

@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@nbevans
Copy link

nbevans commented Dec 29, 2020

I used a suggestion to create a custom VisualStateManager as per https://stackoverflow.com/questions/33290361/how-to-make-the-commandbar-open-towards-the-bottom-of-the-screen

It seems to work fine for me?

@educos35
Copy link

Hi everybody,
I work on a Xamarin Forms (rendered in Android and UWP plateform) apps that uses navigation and toolbaritems on each pages.
I just migrate to the last plateform of XF released as NuGet package (5.0.0.2012) and I can still say that the problem is there. I could esaly reproduce the problem using the "ToolbarItemDemos" project after changing the toolbaritems text to make them longer and force the toolbar to resize. What is strange is that the behavior is different according to the place of the page on my screen. If I put the top of the page near the top of my screen, resizing is correct, and toolbar is growing down, but if I move the page on the middle of my screen, then the resize is inverted !?!

Correct behaviour (the top of the image is the top of my screen)
image

Incorrect behaviour (I just move the windows some pixel down)
image

So, what is the progress of the issue ?
Is there any workaround ? (what about the workaround mentioned by @nbevans. I do not seen how to implement it in Xamarin Solution)
Is there a preview date / version for the issue ?

Regards.

Eric.

@nbevans
Copy link

nbevans commented Feb 27, 2021

@educos35 did you try the solution in the link above? It worked for me. Not ideal but better than being blocked until Xamarin Forms has a bug fix - which could be months or worse.

@educos35
Copy link

@nbevans : Hi...thanks for your suggestion, but I am missing something in understanding how to use the OpenDownCommandBar. Should I simply add that on the MainPage.xaml of my UWP project ?

<Page.TopAppBar>
mycontrols:OpenDownCommandBar</mycontrols:OpenDownCommandBar>
</Page.TopAppBar>

It does not work...It adds a new bar above the Xamarin toolbar

I tried to replace the OpenDownCommandBar to inherit from FormsCommandBar and not from CommandBar as it seems that this is the Type used to define the Toolbar. Now, I get only one toolbar, but behaviour is like before...

Could you test ont the Xamarin Sample ToolbaritemDemos project ?

Regards.

@educos35
Copy link

Hi everybody !
Can someone tell me when this issue should be solved. I have a ticket open by my client on my app. I have to answer something...either a version, a date, or even a workaround. I tried to use the suggestion made by @nbevas, but without success.
Regards.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests