DxPopup.ShowCloseButton Property
Specifies whether to display the Close in a pop-up window’s header.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public bool ShowCloseButton { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to display the Close button; otherwise, false. |
Remarks
The code snippet below demonstrates how to close the pop-up window when the Close button is hidden.
<div class="target-container" @onclick="@(() => PopupVisible = true)">Delete</div>
<DxPopup HeaderText="Are you sure you want to delete the row?"
ShowCloseButton="false"
@bind-Visible="@PopupVisible">
<div>
<button class="btn btn-link" type="button" @onclick="@OnDelete">OK</button>
<button class="btn btn-link" type="button" @onclick="@(() => PopupVisible = false)">Cancel</button>
</div>
</DxPopup>
@code {
WeatherForecast[] forecasts;
WeatherForecast DeletedForecast;
bool PopupVisible = false;
async void OnDelete() {
if (DeletedForecast != null)
forecasts = await ForecastService.Remove(DeletedForecast);
PopupVisible = false;
}
}
See Also