Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: NumberBox: Improve the lightweight styling experience #2844

Open
Felix-Dev opened this issue Jul 6, 2020 · 1 comment
Open

Proposal: NumberBox: Improve the lightweight styling experience #2844

Felix-Dev opened this issue Jul 6, 2020 · 1 comment
Assignees
Labels
area-Styling feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@Felix-Dev
Copy link
Contributor

Proposal: NumberBox: Improve the lightweight styling experience

Summary

The lightweight styling experience of the NumberBox control currently is

  • not coherent
  • not isolated from the rest of the control system
  • limited

Lightweight-styling experience is not coherent

  • To set the foreground appearance of the Popup SpinButton, developers need to use the RepeatButtonForeground theme resource.
  • To set the background of the Popup, developers need to use the SystemControlBackgroundAltHighBrush theme resource.
  • To set the border thickness and the border color of the Popup, developers need to use the ToolTipBorderThemeThickness and ToolTipBorderBrush theme resources.

Lightweight-styling experience is not isolated from the rest of the control system

Since the NumberBox SpinButton Popup is a Popup control, the theme resources controlling its appearances need to be defined at the app level. Consequently, overriding theme resources like ToolTipBorderBrush will also affect the app's tooltips then. Since tooltips also can only be be lightweight-styled on the app level, developers here will have to create a new (implicit) ToolTip style even though all they wanted to do was style the NumberBox Popup.

Lightweight-styling experience is currently limited

It's not possible right now to individually change the foreground of the NumberBox SpinButtons with lightweight styling. As such, a design like the one below cannot currently be achieved without having to re-template the control or walk the visual tree:
image

Conclusion

I propose to create a fully-featured lightweight-styling experience for the NumberBox by introducing dedicated theme resources, like:

* NumberBoxPopupBackground
* NumberBoxPopupBorderBrush
* NumberBoxPopupBorderThickness

* NumberBoxPopupSpinButtonUpBackground + ["", PointerOver, Pressed, Disabled]
* NumberBoxPopupSpinButtonUpForeground + ["", PointerOver, Pressed, Disabled]
* NumberBoxPopupSpinButtonUpBorderBrush + ["", PointerOver, Pressed, Disabled]
* NumberBoxPopupSpinButtonDownBackground + ["", PointerOver, Pressed, Disabled]
* NumberBoxPopupSpinButtonDownForeground + ["", PointerOver, Pressed, Disabled]
* NumberBoxPopupSpinButtonDownBorderBrush + ["", PointerOver, Pressed, Disabled]

* NumberBoxSpinButtonUpBackground + ["", PointerOver, Pressed, Disabled]
* NumberBoxSpinButtonUpForeground + ["", PointerOver, Pressed, Disabled]
* NumberBoxSpinButtonUpBorderBrush + ["", PointerOver, Pressed, Disabled]
* NumberBoxSpinButtonDownBackground + ["", PointerOver, Pressed, Disabled]
* NumberBoxSpinButtonDownForeground + ["", PointerOver, Pressed, Disabled]
* NumberBoxSpinButtonDownBorderBrush + ["", PointerOver, Pressed, Disabled]
@Felix-Dev Felix-Dev added the feature proposal New feature proposal label Jul 6, 2020
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jul 6, 2020
@StephenLPeters StephenLPeters added area-Styling team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jul 6, 2020
@StephenLPeters
Copy link
Contributor

@SavoySchuler FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Styling feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants