ScheduledToastNotification 클래스

정의

예약된 시간에 표시할 알림 메시지를 정의하는 XML을 포함합니다.

public ref class ScheduledToastNotification sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IScheduledToastNotificationFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class ScheduledToastNotification final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IScheduledToastNotificationFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ScheduledToastNotification final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IScheduledToastNotificationFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ScheduledToastNotification final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IScheduledToastNotificationFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
public sealed class ScheduledToastNotification
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IScheduledToastNotificationFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ScheduledToastNotification
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IScheduledToastNotificationFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ScheduledToastNotification
function ScheduledToastNotification(content, deliveryTime, snoozeInterval, maximumSnoozeCount)
Public NotInheritable Class ScheduledToastNotification
상속
Object Platform::Object IInspectable ScheduledToastNotification
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 예제에서는 1시간 안에 표시되도록 예약된 알림 메시지를 보여줍니다.

var Notifications = Windows.UI.Notifications;
var currentTime = new Date();
var seconds = 60;
var dueTime = new Date(currentTime.getTime() + seconds * 60 * 1000);
var idNumber = Math.floor(Math.random() * 100000000);  // Generates a unique ID number for the notification.

// Set up the notification text.
var toastXml = Notifications.ToastNotificationManager.getTemplateContent(Notifications.ToastTemplateType.toastText02);
var strings = toastXml.getElementsByTagName("text");
strings[0].appendChild(toastXml.createTextNode(This is a scheduled toast notification));
strings[1].appendChild(toastXml.createTextNode("Received: " + dueTime.toLocaleTimeString()));

// Create the toast notification object.
var toast = new Notifications.ScheduledToastNotification(toastXml, dueTime);
toast.id = "Toast" + idNumber;

// Add to the schedule.
Notifications.ToastNotificationManager.createToastNotifier().addToSchedule(toast);

설명

ScheduledToastNotification을 호출하여 이 개체의 새 instance 만들고 초기화합니다.

버전 기록

Windows 버전 SDK 버전 추가된 값
1607 14393 NotificationMirroring
1607 14393 RemoteId
1803 17134 ExpirationTime

생성자

ScheduledToastNotification(XmlDocument, DateTime)

한 번만 표시되는 ScheduledToastNotification의 새 instance 만들고 초기화합니다.

ScheduledToastNotification(XmlDocument, DateTime, TimeSpan, UInt32)

Windows 10 사용되지 않습니다. Windows 8 시스템에서 는 처음 나타난 후 지정된 시간 후에 다시 나타나는 ScheduledToastNotification의 새 instance 만들고 초기화합니다. Windows 10 이 함수는 ScheduledToastNotification(XmlDocument, DateTime)과 동일합니다. Windows 10 동일한 다시 알림 간격 동작을 수행하려면 알림에 단추를 사용할 수 있습니다.

속성

Content

이 예약된 알림 메시지를 정의하는 XML을 가져옵니다.

DeliveryTime

이 알림 메시지가 표시되도록 예약된 시간을 가져옵니다.

ExpirationTime

알림의 만료 시간을 가져오거나 설정합니다.

Group

알림에 대한 그룹 식별자를 가져오거나 설정합니다.

Id

특정 예약된 알림을 식별하는 데 사용되는 개발자 지정 값을 가져옵니다.

MaximumSnoozeCount

이 알림을 표시할 최대 횟수를 가져옵니다.

NotificationMirroring

알림 미러링을 사용할지 여부를 지정하는 값을 가져오거나 설정합니다. (알림 미러링을 사용하면 알림을 여러 디바이스에 표시할 수 있습니다.)

RemoteId

시스템에서 이 알림을 다른 디바이스에서 생성된 다른 알림과 상호 연결할 수 있도록 하는 알림의 원격 ID를 가져오거나 설정합니다.

SnoozeInterval

알림 발생 사이의 시간을 가져옵니다.

SuppressPopup

알림의 팝업 UI가 사용자의 화면에 표시되는지 여부를 가져오거나 설정합니다.

Tag

그룹 내에서 알림 메시지를 고유하게 식별하는 문자열을 가져오거나 설정합니다.

적용 대상

추가 정보