Skip to content

CommandBar Popup renders incorrectly on initial load, and has wrong vertical offset on all loads #13213

Closed

Description

@ramezgerges

Current behavior

Normally, CommandBars have a "SecondaryCommands" button that expands the bar and opens a popup with a list of secondary commands when pressed, like this
2d04ac44-d20e-4932-983a-105de7a1c511
What actually happens on Uno is this
29ce9adf-1e76-4d16-aef8-47051d77b624

The popup is opened where a collapsed CommandBar would be, not where an expanded one is.

Also, on the initial render, the Popup doesn't take its full correct width, but is only wide enough to contain the words "Like" and "Dislike", without the right padding present in the above screenshots

Expected behavior

2d04ac44-d20e-4932-983a-105de7a1c511

How to reproduce it (as minimally and precisely as possible)

	<TextBlock Text="Hello, world !" Margin="20" FontSize="30" />
	
	<CommandBar Grid.Row="2">
		<AppBarToggleButton Icon="Shuffle" Label="Shuffle" Click="AppBarButton_Click" />
		<AppBarToggleButton Icon="RepeatAll" Label="Repeat" Click="AppBarButton_Click"/>
		<AppBarSeparator/>
		<AppBarButton Icon="Back" Label="Back" Click="AppBarButton_Click"/>
		<AppBarButton Icon="Stop" Label="Stop" Click="AppBarButton_Click"/>
		<AppBarButton Icon="Play" Label="Play" Click="AppBarButton_Click"/>
		<AppBarButton Icon="Forward" Label="Forward" Click="AppBarButton_Click"/>

		<CommandBar.SecondaryCommands>
			<AppBarButton Label="Like" Click="AppBarButton_Click"/>
			<AppBarButton Label="Dislike" Click="AppBarButton_Click"/>
		</CommandBar.SecondaryCommands>

		<CommandBar.Content>
			<TextBlock Text="Now playing..." Margin="12,14"/>
		</CommandBar.Content>
	</CommandBar>

</Grid>

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    kind/bug
    triage/untriaged
    difficulty/tbd
    on Aug 11, 2023
  2. self-assigned this
    on Aug 11, 2023
  3. added
    project/layout 🧱
    difficulty/medium 🤔
    area/popups 💬
    and removed
    difficulty/tbd
    on Sep 20, 2023
  4. changed the title [-]CommandBar Popup renders incorrectly on initial load, and has wrong vertical offset on all loads[/-] [+]`CommandBar` Popup renders incorrectly on initial load, and has wrong vertical offset on all loads[/+] on Sep 20, 2023
  5. removed
    triage/untriaged
    on Oct 25, 2023
  6. Youssef1313 commented on Mar 3, 2024

    @Youssef1313
    Member

    This should be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/popups 💬difficulty/medium 🤔kind/bugproject/layout 🧱

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions