Dela via


ToastCollection Class

Definition

Represents a group of notifications for a particular app.

public ref class ToastCollection sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IToastCollectionFactory, 262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class ToastCollection final
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IToastCollectionFactory, 262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ToastCollection final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IToastCollectionFactory), 262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class ToastCollection
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IToastCollectionFactory), 262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ToastCollection
function ToastCollection(collectionId, displayName, launchArgs, iconUri)
Public NotInheritable Class ToastCollection
Inheritance
Object Platform::Object IInspectable ToastCollection
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

Use a ToastCollectionManager to save, update, and remove ToastCollection objects.

Constructors

ToastCollection(String, String, String, Uri)

Creates a new toast notification group.

Properties

DisplayName

Gets or sets the group title that displays in the Action Center.

Icon

Gets or sets the icon that displays next to the group title in the Action Center.

Id

Gets the ID of this notification group.

LaunchArgs

Gets or sets the launch arguments provided to app when the notification group title is clicked in the Action Center.

Applies to

See also