microsoft / microsoft/microsoft-ui-xaml
Proposal: Add AccentSplitButtonStyle as a built-in style
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
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):
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:
```xml
```
## 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.
Contributor guide
Assessment
This issue has not been assessed yet.