question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Theming Blazor App

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
EdCharbeneaucommented, Apr 12, 2018

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…

4reactions
miroslavpcommented, Apr 14, 2018

@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!

Our charts don’t rely on Angular needing some baked in Theme system.

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Blazor Material Themes?
In the Blazor application, the application theme can be changed dynamically by changing its style sheet reference in code. Change theme dynamically in...
Read more >
Themes | Blazor
The DevExpress Blazor component suite ships with a set of built-in DevExpress themes. You can also use a bootstrap-external stylesheet to apply external ......
Read more >
UI/Blazor/Theming | Documentation Center | ABP.IO
Determines a set of base libraries used and adapted by all the themes. So, module and application developers can depend on and use...
Read more >
How to implement multiple themes in BlazorWasm app
Define new theme has to follow application structure and compatible with routes, models, backend APIs … etc. However, first we'll start this ...
Read more >
Blazor Material UI - Configuration and Theme Customization
In this article, we are going to learn how to integrate Material UI for our Blazor WebAssembly application and how to modify themes....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found