Back to Devexpress

DxWindow.HeaderText Property

blazor-devexpress-dot-blazor-dot-dxwindow-3c5862e7.md

latest2.9 KB
Original Source

DxWindow.HeaderText Property

Specifies text displayed in the Window header.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string HeaderText { get; set; }

Property Value

TypeDescription
String

The header’s text.

|

Remarks

Use the HeaderText and BodyText properties to specify text displayed in the Window header and body. To display text in the Window footer, set the ShowFooter property to true and define the FooterText property. All predefined appearance settings apply to these Window elements.

razor
<DxButton RenderStyle="ButtonRenderStyle.Secondary" 
          Click="() => WindowVisible = !WindowVisible">SHOW A WINDOW</DxButton>
<DxWindow @bind-Visible=WindowVisible
          HeaderText="Header"
          BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet metus vel
             nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus, accumsan orci auctor,
             imperdiet mauris. Fusce id purus magna."
          Width="max(25vw, 250px)">
</DxWindow>

@code {
    bool WindowVisible { get; set; } = false;
}

Run Demo: Window - Overview

You can also use the following properties to customize the header’s content and appearance:

HeaderCssClassAssigns a CSS class to the header.HeaderTextTemplateSpecifies the template for the Window’s header text area.HeaderContentTemplateSpecifies a template for content of the window’s header.HeaderTemplateSpecifies a template for the window’s header. Replaces the default render fragment (including paddings, scrollbars, etc.)

Predefined appearance settings do not apply. This template has the highest priority over the HeaderText, HeaderCssClass, HeaderTextTemplate, and HeaderContentTemplate properties.

Disable the ShowHeader property to hide the header.

For additional information about Window customization, refer to the following help topic: Content and Appearance.

See Also

DxWindow Class

DxWindow Members

DevExpress.Blazor Namespace