Skip to content

SplitButton flyout is not honoring the Flyout.Placement property #11006

@vgromfeld

Description

@vgromfeld

Describe the bug

The Flyout attached to a SplitButton is always opening with a BottomEdgeAlignedLeft placement.
We don't have any way to use a different placement (like Bottom to have the Flyout being centered).

Why is this important?

In our application, we are using both split buttons and regular buttons to show some flyouts.
We'd like to have all our flyouts to be Bottom aligned for visual consistency.

Steps to reproduce the bug

Use the following XAML:

<SplitButton Content="Click me">
    <SplitButton.Flyout>
        <MenuFlyout Placement="Bottom">
            <MenuFlyoutItem Text="Menu item 1 -- do something useless">
                <MenuFlyoutItem.Icon>
                    <SymbolIcon Symbol="Accept" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
            <MenuFlyoutItem Text="Menu item 2 -- do something useless">
                <MenuFlyoutItem.Icon>
                    <SymbolIcon Symbol="Accept" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
            <MenuFlyoutItem Text="Menu item 3 -- do something useless">
                <MenuFlyoutItem.Icon>
                    <SymbolIcon Symbol="Accept" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
        </MenuFlyout>
    </SplitButton.Flyout>
</SplitButton>

Actual behavior

The Flyout is always left aligned with the SplitButton:

Image

Expected behavior

The Flyout should use the Flyout.Placement property if set by the user.
When using Placement="Bottom" we're expecting the following layout:

Image

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.8.5: 1.8.260209005

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions