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

Allow overriding of resources within a control's template (Lightweight Styling) #829

Closed
kazo0 opened this issue Jul 18, 2022 · 2 comments
Closed
Labels
kind/enhancement New feature or request

Comments

@kazo0
Copy link
Collaborator

kazo0 commented Jul 18, 2022

There are currently many areas in Material and Cupertino that are hardcoding references to specific brush resources within the template of the control.

Example:
The Disabled VisualState for TextBox forces the Border.Fill and PlaceholderElement.Foreground to specific brush resources. This is limiting the amount of customization that client apps should have over the default Material/Cupertino styles.

One idea would be to follow Microsoft's path for Lightweight Styling. This is already being done for certain styles, like here for the V2 FAB styles.

Another approach would be to take advantage of TemplateSettings classes, which @Xiaoy312 can explain further.

@kazo0 kazo0 added the kind/enhancement New feature or request label Jul 18, 2022
@Xiaoy312
Copy link
Contributor

We are probably not going to take that 2nd approach for 2 reasons:

  1. "TemplateSettings classes provide a set of properties that are used when you define a new control template for a control."
  2. "they are calculated values coming from the basic control logic"

While 1 can be bypassed with attached property and there is counter-example for 2, it doesnt make them easily accessible for dev to alter them.

@kazo0
Copy link
Collaborator Author

kazo0 commented Oct 1, 2022

Closing this as it is now being planned/tracked here: #854

@kazo0 kazo0 closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants