Skip to content

Proposal: Add AccentSplitButtonStyle as a built-in style #11133

Description

Proposal

Add AccentSplitButtonStyle as a built-in style resource for SplitButton, mirroring the AccentButtonStyle resource that already exists for Button.

Why

Button ships with an AccentButtonStyle out of the box. SplitButton does not — so every app that wants a primary / accent-tinted SplitButton (e.g. a Save | ⌄ command where the primary action should pop visually) has to copy the entire SplitButton ControlTemplate, including all ~22 visual states and the inner Button reset style, and re-map the brushes by hand. This is fragile, drifts away from the platform default over time, and creates inconsistencies between apps.

Real-world examples:

  • PowerToys uses primary / accent split-button-like patterns in several utilities.
  • Many 1P apps reach for SplitButton exactly when they need a primary command with a secondary menu — the canonical "accent button" use case.

PowerRename (PowerToys):

Image

For consistency with Button and so apps don't have to re-derive a full template every time, it would be great to ship this as part of WinUI.

Proposed API

One new ResourceDictionary key:

  • AccentSplitButtonStyle — primary fill uses the AccentButtonBackground family; the divider uses ControlStrokeColorOnAccentDefaultBrush so it stays visible against the accent fill.

Usage:

<SplitButton Content="Save" Style="{StaticResource AccentSplitButtonStyle}">
    <SplitButton.Flyout>
        <MenuFlyout>
            <MenuFlyoutItem Text="Save as..." />
        </MenuFlyout>
    </SplitButton.Flyout>
</SplitButton>

Notes

  • Template structure is preserved verbatim — only theme brushes are swapped, so behavior matches the default SplitButtonStyle.
  • All brushes referenced (AccentButton*, ControlStrokeColorOnAccentDefaultBrush) already ship with WinUI today.
  • No separate accent style is needed for ToggleSplitButton — its existing Checked* visual states already render accent-tinted visuals when toggled on.

Metadata

Metadata

Type

No type

Projects

Status
In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions