ToastNotification.ExpirationTime Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
- Toast notifications sample
- Sending toast notifications from desktop apps sample
- Toast XML schema
- Tiles, badges, and notifications
- Quickstart: Sending a toast notification
- Quickstart: Sending a toast push notification
- Quickstart: Sending a toast notification from the desktop
- Guidelines and checklist for toast notifications
- How to handle activation from a toast notification
- How to opt in for toast notifications
- How to schedule a toast notification
- How to enable desktop toast notifications through an AppUserModelID
- The toast template catalog
- Toast audio options