blazor-devexpress-dot-blazor-dot-dxpopupbase-2e9e0887.md
Specifies whether the header displays the Close button.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(true)]
[Parameter]
public bool ShowCloseButton { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to display the Close button; otherwise, false.
|
Users can close the Popup in the following ways:
Set the ShowCloseButton property to false to hide the close button. The CloseOnOutsideClick and CloseOnEscape properties allow you to disable other user capabilities.
<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."
ShowCloseButton="false"/>
@code {
bool PopupVisible { get; set; } = false;
}
You can also use the templates listed below to implement a custom close action. In the template, use the context parameter’s CloseCallback property.
See Also