Theming Blazor App
See original GitHub issueI know that we are at the very early development stage, however, I think this would be very cool to have in some of the future versions. What I would like to see is the ability to theme my Blazor app. Something that resembles the WebForms Themes would suffice.
You can see more about it here: https://msdn.microsoft.com/en-us/library/ykzx33wh.aspx
The theme will be responsible for adding the corresponding theme css links as well as setting components properties that are specified in the skin files (the “skin” term is borrowed from WebForms).
So if the Counter component has an “IncrementBy” property, we can specify different value in the skin file for each theme.
Theme1 skin file content:
<Counter IncrementBy="1" />
Theme2 skin file content:
<Counter IncrementBy="10" />
This way we can customize the behavior of our components based on the selected theme.
Also, if we don’t want it to apply to all Counter components we can specify SkinId like this
<Counter IncrementBy="1" SkinId="MainPage"/>
which means that the IncrementBy property will be initially set to 1, only for Counter components that has SkinId property value of “MainPage”.
I hope my English makes sense 😃
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:21 (5 by maintainers)
Just let css do it’s job. The more frameworks interfere with how styles are implemented, the worse off we all are.
If it isn’t broke…
@EdCharbeneau This is exactly the type of controls I’m talking about. Now, imagine you have 5 of those charts in your web app located on different pages. How would you change their type from, say, “pie” to “bar” at runtime if you wish to? Not imperatively, but with css!
Your charts don’t need to rely on any Theme system! I don’t think you get how theming works at all. It’s the theme that updates the control state. The control itself is not aware of the existence of the theme.
P.S. I have friends working at Telerik here in Sofia, Bulgaria as senior devs and my office is just 2 intersections away from them. They can understand me what I’m saying, but obviously not you. Sigh