Skip to main content
A newer version of this page is available.
All docs
V20.2

DxPopup.Content Property

Specifies the pop-up window’s content.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment Content { get; set; }

Property Value

Type Description
RenderFragment

A template for a pop-up window’s content.

Remarks

If you do not use templates in the pop-up window, you can specify its content directly between the <DxPopup> and </DxPopup> tags.

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

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

When you define the HeaderTemplate and/or FooterTemplate, you should use the Content property to specify the pop-up window’s content.

<DxPopup HeaderText="Header"
        @bind-Visible="@PopupVisible">
    <Content>
        <p>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.</p>
    </Content>
    <FooterTemplate>
        <div class="modal-footer">
            <button class="btn btn-primary" @onclick="@(() => PopupVisible = false)">OK</button>
        </div>   
    </FooterTemplate>
</DxPopup>

@code {
    bool PopupVisible { get; set; }
}
See Also