Back to Devexpress

DxMessageBox.OkButtonText Property

blazor-devexpress-dot-blazor-dot-dxmessagebox-3c3394b0.md

latest1.7 KB
Original Source

DxMessageBox.OkButtonText Property

Specifies the OK button text.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
Stringnull

The button text.

|

Remarks

Use the OkButtonText property to customize the OK button text.

When the Type property is set to Confirmation, the message box additionally 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