Skip to content

feat(controls): Implement SpinButtonPlacementMode.Compact for NumberBox#1709

Merged
pomianowski merged 5 commits intolepoco:mainfrom
chucker:feature/number-box/compact-spin-button
May 4, 2026
Merged

feat(controls): Implement SpinButtonPlacementMode.Compact for NumberBox#1709
pomianowski merged 5 commits intolepoco:mainfrom
chucker:feature/number-box/compact-spin-button

Conversation

@chucker
Copy link
Copy Markdown
Collaborator

@chucker chucker commented May 3, 2026

NumberBox already had a SpinButtonPlacementMode.Compact; however, it previously had the same effect as Hidden. This adds a style to NumberBox that will:

  • add a button with an up/down symbol:
image
  • when clicked, pop out a flyout, with buttons to increment/decrement:
image

It also expands Gallery's NumberBoxPage to let users try out the three variants.

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Issue Number: fixes #1673

What is the new behavior?

SpinButtonPlacementMode.Compact now has its own look/behavior.

Other information

The result roughly matches the look+feel in WinUI 3 Gallery 2.9.0.0:

image image

Minor differences:

  • there's no Flyout drop shadow (see Flyout should have a drop shadow #1708)
  • the buttons should probably have the "subtle" style, which I don't believe WPF UI implements; from the WinUI gallery:
image

@chucker chucker requested a review from pomianowski as a code owner May 3, 2026 16:32
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request gallery WPF UI Gallery dotnet release labels May 3, 2026
@pomianowski pomianowski changed the title Implement SpinButtonPlacementMode.Compact for NumberBox feat(controls): Implement 'SpinButtonPlacementMode.Compact' for NumberBox May 3, 2026
@stanlrt
Copy link
Copy Markdown

stanlrt commented May 3, 2026

Thanks for doing it, in the end i never found the time

@pomianowski pomianowski changed the title feat(controls): Implement 'SpinButtonPlacementMode.Compact' for NumberBox feat(controls): Implement SpinButtonPlacementMode.Compact for NumberBox May 4, 2026
@pomianowski pomianowski merged commit 5922459 into lepoco:main May 4, 2026
2 checks passed
@chucker chucker deleted the feature/number-box/compact-spin-button branch May 4, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. dotnet gallery WPF UI Gallery PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NumberBox's SpinButtonPlacementMode="Compact" behaves like "Hidden"

3 participants