Edit

Share via


ToastButtonSnooze Class

Definition

A system-handled snooze button that automatically handles snoozing of a Toast notification.

public sealed class ToastButtonSnooze : Microsoft.Toolkit.Uwp.Notifications.IToastButton
type ToastButtonSnooze = class
    interface IToastButton
Public NotInheritable Class ToastButtonSnooze
Implements IToastButton
Inheritance
ToastButtonSnooze
Implements

Constructors

ToastButtonSnooze()

Initializes a new instance of the ToastButtonSnooze class.

ToastButtonSnooze(String)

Initializes a new instance of the ToastButtonSnooze class. Initializes a system-handled snooze button that displays your text on the button and automatically handles snoozing.

Properties

CustomContent

Gets custom text displayed on the button that overrides the default localized "Snooze" text.

HintActionId

Gets or sets an identifier used in telemetry to identify your category of action. This should be something like "Delete", "Reply", or "Archive". In the upcoming toast telemetry dashboard in Dev Center, you will be able to view how frequently your actions are being clicked.

ImageUri

Gets or sets an optional image icon for the button to display.

SelectionBoxId

Gets or sets the ID of an existing ToastSelectionBox in order to allow the user to pick a custom snooze time. Optional. The ID's of the ToastSelectionBoxItems inside the selection box must represent the snooze interval in minutes. For example, if the user selects an item that has an ID of "120", then the notification will be snoozed for 2 hours. When the user clicks this button, if you specified a SelectionBoxId, the system will parse the ID of the selected item and snooze by that amount of minutes. If you didn't specify a SelectionBoxId, the system will snooze by the default system snooze time.

Applies to