Windows overlay color

1 Answer 37 Views
Window
Nikolas
Top achievements
Rank 2
Iron
Iron
Nikolas asked on 10 Jan 2022, 08:57 AM

Hello,

Is there a way to change the color or opacity of the k-overlay class, without overwriting the class?

I have a scenario where I would like the color to be transparent, but keep it black in other scenarios.

Regards,
Nikolas

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 10 Jan 2022, 07:12 PM

Hello Nikolas,

CSS is the only way. You can consider adding a class to the <body> element (or similar very high-level element) to cascade your styles through only when needed. Perhaps using JS Interop for that is going to perform better as you won't have to re-render a lot, and you have easier access to high-level elements that way. Just make sure to remove it once the window closes in  the VisibleChanged event.

Regards,
Marin Bratanov
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
Tags
Window
Asked by
Nikolas
Top achievements
Rank 2
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or