Skip to main content

DxPopupBase.HeaderText Property

Specifies text displayed in the Popup header.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
String

The header’s text.

Remarks

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

Implement two-way binding for the Visible property to show the Popup in code and update the property value when a user closes the Popup.

<div @onclick="@(() => PopupVisible = true)">
    <p>CLICK TO SHOW A POP-UP WINDOW</p>
</div>

<DxPopup @bind-Visible="@PopupVisible"
         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." />

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

Blazor Popup

Run Demo: Popup - Overview

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

  • HeaderCssClass - Specifies the CSS class applied to the header.
  • HeaderContentTemplate - Allows you to customize the header’s content area. This template takes priority over the HeaderText and HeaderCssClass properties.
  • HeaderTemplate - Allows you to customize the entire header. Predefined appearance settings do not apply. This template has the highest priority over the HeaderText, HeaderCssClass, and HeaderContentTemplate properties.

Disable the ShowHeader property to hide the header.

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

See Also