MessageBoxOptions.SizeMode Property
Specifies the size of the message box and its content.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(null)]
public SizeMode? SizeMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Nullable<SizeMode> | null | The size mode. If the property is not specified (the value is |
Available values:
Name | Description |
---|---|
Small | Small size. |
Medium | Medium size. |
Large | Large size. |
Remarks
The SizeMode
property allows you to apply different size modes to the message box. For more information, refer to the following topic: Size Modes.
The following code snippet applies the Small
size mode to the message box:
<DxDialogProvider />
<DxButton Text="Show a message box window" Click="@OpenConfirmDialogAsync" />
@code {
[Inject] IDialogService DialogService { get; set; }
private async Task OpenConfirmDialogAsync() {
await DialogService.ConfirmAsync(new MessageBoxOptions() {
SizeMode = SizeMode.Small,
Title = "Error",
Text = "Unable to process the request. Please try again later or contact support.",
OkButtonText = "Contact Support",
CancelButtonText = "Try Later",
RenderStyle = MessageBoxRenderStyle.Danger
});
}
}
See Also