ToastNotification.ExpirationTime Property

Definition

Gets or sets the time after which a toast notification should not be displayed.

public:
 property IReference<DateTime> ^ ExpirationTime { IReference<DateTime> ^ get(); void set(IReference<DateTime> ^ value); };
IReference<DateTime> ExpirationTime();

void ExpirationTime(IReference<DateTime> value);
public System.Nullable<System.DateTimeOffset> ExpirationTime { get; set; }
var iReference = toastNotification.expirationTime;
toastNotification.expirationTime = iReference;
Public Property ExpirationTime As Nullable(Of DateTimeOffset)

Property Value

IReference<DateTime>

Nullable<DateTimeOffset>

The date and time after which the toast is no longer considered current or valid and should not be displayed.

Remarks

Windows attempts to raise toast notifications immediately after you call Show, so this property is rarely used.

For Windows Phone 8.x app: this property also causes the toast notification to be removed from the action center once the specified date and time is reached.

Applies to

See also