Back to Devexpress

DxDialogProvider.ThemeMode Property

blazor-devexpress-dot-blazor-dot-dxdialogprovider-38a45593.md

latest2.0 KB
Original Source

DxDialogProvider.ThemeMode Property

Specifies a message box’s predefined color filling mode.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(MessageBoxThemeMode.Auto)]
[Parameter]
public MessageBoxThemeMode ThemeMode { get; set; }

Property Value

TypeDefaultDescription
MessageBoxThemeModeAuto

The theme mode.

|

Available values:

NameDescription
Auto

The applied theme depends on the DevExpress theme. For the Blazing Berry, Purple, or Office White theme, applies the dark theme to a message box. For the Blazing Dark theme, applies the light theme to a message box.

| | Light |

Applies the light theme to a message box.

| | Dark |

Applies the dark theme to a message box.

|

Remarks

Use RenderStyle and ThemeMode properties to specify a message box style.

razor
<DxDialogProvider ThemeMode="MessageBoxThemeMode.Dark" RenderStyle="MessageBoxRenderStyle.Danger" />
<DxButton Text="Show a message box window" Click="@OpenConfirmDialogAsync" />

@code {
    [Inject] IDialogService DialogService { get; set; }

    private async Task OpenConfirmDialogAsync() {
        await DialogService.ConfirmAsync(new MessageBoxOptions() {
            Title = "Error",
            Text = "Unable to process the request. Please try again later or contact support.",
        });
    }
}

See Also

DxDialogProvider Class

DxDialogProvider Members

DevExpress.Blazor Namespace