NumberBox: Updated the border and background of the spin button popup to match Fluent Design guidelines. #3130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the border and background brushes of the NumberBox spin button popup (showhen when the NumberBox is set to a SpinButtonPlacementMode of [Compact]. As the popup is a transient UI, per the acrylic guidelines it should sport in-app acrylic as its default background.
As an additional benefit, the popup can now easily be distinguished from the default page background in dark theme.
The updated brushes have been taken from the MenuFlyout default style as requested by the team. Below you find a table showing the updated design:
The in-app acrylic effect is noticeable as you can see here and below:
In High-contrast mode, the look remains essentially unchanged from today:
Implementation Notes
In order to implement these changes, I introduced a couple new theme resources:
These resources where required because prior to this PR, the Popup's background, border brush & thickness were driven by the following theme resources:
The new
NumberBoxPopupSpinButtonBackground
has been introduced to set the background of Popup's spin buttons to transparent so that we will get the full acrylic effect. Previously, the background of a spin button was set by theTextControlBackground
theme resource to a background not fully transparent.Updating these resources was not an option as they would have affected controls other than the NumberBox as well, so I made the decision here to introduce a couple of NumberBox specific theme resources - which is something which should be done anyway (see tracking issue #2844).
Motivation and Context
Fixes #2843.
How Has This Been Tested?
Tested visually (see screenshots above).
Additional Notes
@chigy @kikisaints FYI.