Back to Devexpress

DxMessageBox.CancelButtonText Property

blazor-devexpress-dot-blazor-dot-dxmessagebox-43625dab.md

latest1.6 KB
Original Source

DxMessageBox.CancelButtonText Property

Specifies the Cancel button text.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(null)]
[Parameter]
public string CancelButtonText { get; set; }

Property Value

TypeDefaultDescription
Stringnull

The button text.

|

Remarks

When the Type property is set to Confirmation, the message box displays the Cancel button. Use the CancelButtonText property to customize the button text.

Run Demo

razor
<DxButton Text="Show Alert" Click="@(() => MessageBoxVisible = true)" />

<DxMessageBox @bind-Visible="MessageBoxVisible"
              Title="Error"
              Text="Unable to process the request. Please try again later or contact support."
              OkButtonText="Contact Support"
              CancelButtonText="Try Later"
              RenderStyle="MessageBoxRenderStyle.Danger"
              Type="MessageBoxType.Confirmation"/>
@code {
    bool MessageBoxVisible { get; set; } = false;
}

See Also

DxMessageBox Class

DxMessageBox Members

DevExpress.Blazor Namespace