ScheduledTileNotification 클래스

정의

타일에 대해 되풀이되지 않는 단일 예약 업데이트에 대한 시각적 콘텐츠 및 타이밍을 정의합니다.

public ref class ScheduledTileNotification sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Notifications.IScheduledTileNotificationFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.MTA)]
class ScheduledTileNotification 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.IScheduledTileNotificationFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ScheduledTileNotification 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.IScheduledTileNotificationFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ScheduledTileNotification final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Notifications.IScheduledTileNotificationFactory), 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 ScheduledTileNotification
[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.IScheduledTileNotificationFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ScheduledTileNotification
[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.IScheduledTileNotificationFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ScheduledTileNotification
function ScheduledTileNotification(content, deliveryTime)
Public NotInheritable Class ScheduledTileNotification
상속
Object Platform::Object IInspectable ScheduledTileNotification
특성

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.

var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWide310x150Text09);

// Set up the wide tile text.
var tileTextAttributes = tileXml.getElementsByTagName("text");
tileTextAttributes[0].appendChild(tileXml.createTextNode("This is a scheduled notification"));
tileTextAttributes[1].appendChild(tileXml.createTextNode("Received: " + dueTime.toLocaleTimeString()));

// Set up the medium tile text.
var squareTileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileSquare150x150Text04);
var squareTileTextAttributes = squareTileXml.getElementsByTagName("text");
squareTileTextAttributes[0].appendChild(squareTileXml.createTextNode("This is a scheduled notification"));

// Include the medium tile in the notification.
var node = tileXml.importNode(squareTileXml.getElementsByTagName("binding").item(0), true);
tileXml.getElementsByTagName("visual").item(0).appendChild(node);

// Create the notification object.
var futureTile = new Notifications.ScheduledTileNotification(tileXml, dueTime);
futureTile.id = "Tile" + idNumber;

// Add to the schedule.
Notifications.TileUpdateManager.createTileUpdaterForApplication().addToSchedule(futureTile);

생성자

ScheduledTileNotification(XmlDocument, DateTime)

TileUpdater와 함께 사용할 ScheduledTileNotification 개체의 새 instance 만들고 초기화합니다.

속성

Content

예약된 타일 업데이트의 콘텐츠에 대한 XML 설명을 가져옵니다.

DeliveryTime

타일이 업데이트되도록 예약된 시간을 가져옵니다.

ExpirationTime

타일 알림이 더 이상 표시되지 않아야 하는 시간을 가져오거나 설정합니다. 기본적으로 타일 알림은 만료되지 않습니다. 오래된 콘텐츠를 방지하기 위해 만료 시간을 명시적으로 설정하는 것이 가장 좋습니다.

Id

일정에서 예약된 타일을 식별하는 데 사용되는 고유 ID를 가져오거나 설정합니다.

Tag

중복 알림 콘텐츠가 큐에 표시되지 않도록 Windows에서 사용할 수 있는 문자열을 가져오거나 설정합니다.

적용 대상