Skip to content

Conversation

amwx
Copy link
Owner

@amwx amwx commented Aug 4, 2025

Adds a couple enhancements to the NumberBox control

  1. Adds a "compact" NumberBox style that positions the inline buttons closer to the traditional Win32/Winforms NumericUpDown. Note, this style only has an effect if you want the inline buttons, which is set by default in the Control Theme. This also may not be touch friendly so if your application allows touch input, you may want to consider sticking with the default template or adjusting on the fly based on input method. However, it can make a much nicer appearance for mouse-only situations.
image

You can access this control theme by setting Theme={StaticResource CompactNumberBoxStyle} on any NumberBox you want to display like this.

NOTE: This is only for the NumberBox control. I have no plans to adjust NumericUpDown with something similar.

  1. Adds the InnerLeftContent property to NumberBox. This property was copied over TextBox. Can be useful if you want to add a header or other indicator for the value of the NumberBox. It works with both the normal and compact themes. Because the right side of the NumberBox already has content, I'm not adding InnerRightContent. Note that InnerLeftContent is based on LTR layout, adjusting the flow layout will flip this to show on the right side.
image

I've also removed the 2 unused properties on NumberBox SelectionFlyout and TextReadingOrder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant