Поделиться через


NotificationWindow.Show Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Displays the notification window for the specified number of milliseconds before it times out.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub Show ( _
    durationInMilliseconds As Integer _
)
[SecuritySafeCriticalAttribute]
public void Show(
    int durationInMilliseconds
)

Parameters

  • durationInMilliseconds
    Type: System.Int32
    The duration that the notification window should remain displayed in the system area, specified in milliseconds.

Exceptions

Exception Condition
InvalidOperationException

A different notification window instance is still visible.

Remarks

The durationInMilliseconds period is the period that starts when the notification first fades in, and ends when the fade out animation is completed. The duration of the fade-in and fade-out is system determined. So long as the durationInMilliseconds value is greater than 2000, fade-in and fade-out times are each 1000 milliseconds.

durationInMilliseconds has an upper bound of 30000 and cannot be negative. Setting a value greater than 30000, or less than zero, throws an exception.

Calling Show on the same notification instance where Visibility is still true has no effect, and does not adjust the duration of display specified in the first Show call.

Calling Show on a notification instance while a different notification instance that is initiated by the application is still visible throws an exception

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.