NumberBox: Updated the border and background of the spin button popup to match Fluent Design guidelines.#3130
Merged
StephenLPeters merged 1 commit intomicrosoft:masterfrom Aug 20, 2020
Conversation
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
@kikisaints @YuliKl and/or @SavoySchuler can you take a look at this change from a PM perspective? |
|
Looks good on my end... |
YuliKl
approved these changes
Aug 19, 2020
Kinnara
added a commit
to Kinnara/ModernWpf
that referenced
this pull request
Aug 20, 2020
Member
|
This also looks good to me. @MikeHillberg, I just want to double check, do the theme resource names used here require any kind of review/approval?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
NumberBoxPopupSpinButtonBackgroundhas 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 theTextControlBackgroundtheme 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.