Skip to main content
.NET Framework 4.6.2+

MessageOptions.Duration Property

Specifies the duration of the WinForms Alert, and ASP.NET Web Forms and ASP.NET Core Blazor notification in milliseconds.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public int Duration { get; set; }

Property Value

Type Description
Int32

An integer that specifies the duration of the WinForms Alert, and ASP.NET Web Forms and ASP.NET Core Blazor notification (in milliseconds).

Remarks

A notification message window is closed when this duration ends or when a user clicks the message.

This property has no effect in the following cases:

  • in WinForms applications with Flyout or Toast notifications;
  • in Blazor applications on mobile devices.

The default value is 3000. If the Duration is set to int.MaxValue, the notification does not close automatically.

  • In ASP.NET Core Blazor applications: if the Duration is less than 0, the default value is used. Also, if a user hovers the mouse pointer over a notification message window, the window does not close despite the Duration value.
  • In WinForms and ASP.NET Web Forms applications: if the Duration is less than 0, the notification message closes immediately.
See Also