Skip to content

Add SplitMenuFlyoutItem support #22956

Closed

Description

@MartinZikmund

Summary

Implement SplitMenuFlyoutItem from WinUI 3, which provides a menu flyout item with a split-button design: a primary action button and a secondary button that opens a submenu.

Motivation

SplitMenuFlyoutItem enables scenarios where a menu item needs both a direct action and a set of related sub-options - similar to how SplitButton works but within flyout menus. This is commonly used for actions like "Save" (primary) with "Save As...", "Save All" as sub-options, or "Paste" with "Paste Special" variants.

Currently, achieving this requires workarounds with custom templates or nested flyouts.

API Surface

Class

  • SplitMenuFlyoutItem — inherits from MenuFlyoutItem, implements ISubMenuOwner

Properties

Property Type Description
Items IList<MenuFlyoutItemBase> Collection of submenu items (read-only, content property)
SubMenuPresenterStyle Style Style applied to the submenu's flyout presenter
SubMenuItemStyle Style Style applied to individual submenu items

Inherited from MenuFlyoutItem

  • Text, Icon, Click event, Command/CommandParameter, KeyboardAcceleratorTextOverride

Automation

  • SplitMenuFlyoutItemAutomationPeer — supports IInvokeProvider (primary action) and IExpandCollapseProvider (submenu)

Usage Example

<MenuFlyout>
    <SplitMenuFlyoutItem Text="Save" Icon="Save" Click="Save_Click">
        <MenuFlyoutItem Text="Save As..." Click="SaveAs_Click" />
        <MenuFlyoutItem Text="Save All" Click="SaveAll_Click" />
    </SplitMenuFlyoutItem>
    <MenuFlyoutSeparator />
    <MenuFlyoutItem Text="Exit" />
</MenuFlyout>

Implementation Notes

  • Split-button template with two ButtonBase parts: primary action button and secondary chevron button that opens the submenu
  • Uses CascadingMenuHelper for submenu positioning and cascading behavior (consistent with MenuFlyoutSubItem)
  • Full keyboard navigation: arrow keys between buttons, Enter/Space to activate, Escape to close
  • Fluent theme resources for divider brush, backgrounds, and visual states
  • Supports mixed content in submenu: MenuFlyoutItem, ToggleMenuFlyoutItem, MenuFlyoutSeparator

References

Activity

  1. MartinZikmund commented on Apr 7, 2026

    @MartinZikmund
    MemberAuthor

    Repro generator

    This issue was classified as not reproducible with a code sample or test.

    Reason: This is a feature request for a new control (SplitMenuFlyoutItem) that does not exist anywhere in the Uno Platform codebase — not even as a [NotImplemented] stub. There is no existing behavior to reproduce or verify with a runtime test or manual sample. Any code referencing this API would fail to compile. This is an implementation tracking issue rather than a bug report.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions