Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 1.57 KB

window-custom-css-styling.md

File metadata and controls

69 lines (55 loc) · 1.57 KB
title description type page_title slug position tags ticketid res_type
Custom Window CSS Styling
How to apply custom CSS styles to the Telerik Blazor Window component.
how-to
How to Apply Custom Window CSS Styling
window-kb-custom-css-styling
telerik, blazor, window, styling
kb

Environment

Product Window for Blazor

Description

How to set custom CSS styles to the Window?

Solution

The Window Class parameter lets you define a CSS class that will be rendered on the popup element. You can cascade through it in order to change the appearance of both the content, and the built-in elements of the Window.

Use CSS selectors with higher specificity to customize the looks of the Window. See how to override the Telerik Blazor theme for more tips.

caption Use a Class to change the appearance and style of the Window

<TelerikWindow Class="party-window"
               Visible="true">
    <WindowTitle>
        Window Title
    </WindowTitle>
    <WindowContent>
        Window content
    </WindowContent>
</TelerikWindow>

<style>
    /* style the entire popup element */
    div.k-window.party-window {
        border: 5px solid red;
    }

    /* titlebar */
    div.k-window.party-window .k-window-titlebar {
        background: gold;
    }

    /* title */
    div.k-window.party-window .k-window-title {
        color: blue;
    }

    /* content container */
    div.k-window.party-window .k-window-content {
        background: cyan;
    }

</style>