TileUpdater クラス

定義

アップデーターがバインドされている特定のタイルの内容を変更します。

public ref class TileUpdater sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class TileUpdater final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class TileUpdater final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class TileUpdater
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class TileUpdater
Public NotInheritable Class TileUpdater
継承
Object Platform::Object IInspectable TileUpdater
属性

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 で導入)

次の例は、アプリのタイルに通知を送信するために使用される Update を示しています。

function sendTileTextNotification() {
    var Notifications = Windows.UI.Notifications;

    // Get an XML DOM version of a specific template by using getTemplateContent.
    var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWide310x150Text03);

    // You will need to look at the template documentation to know how many text fields a particular template has.
    // Get the text attribute for this template and fill it in.
    var tileAttributes = tileXml.getElementsByTagName("text");
    tileAttributes[0].appendChild(tileXml.createTextNode("Hello World!"));

    // Create the notification from the XML.
    var tileNotification = new Notifications.TileNotification(tileXml);

    // Send the notification to the calling app's tile.
    Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);
}

次のコード行では 、EnableNotificationQueue を 使用して、呼び出し元アプリのタイルの通知キューを有効にします。

Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication().enableNotificationQueue(true);

次の例は、 RemoveFromSchedule メソッドの使用方法を示しています。

var notifier = Notifications.TileUpdateManager.createTileUpdaterForApplication();
var scheduled = notifier.getScheduledTileNotifications();

for (var i = 0, len = scheduled.length; i < len; i++) {

    // The itemId value is the unique ScheduledTileNotification.Id assigned to the 
    // notification when it was created.
    if (scheduled[i].id === itemId) {
        notifier.removeFromSchedule(scheduled[i]);
    }
}

注釈

このオブジェクトのインスタンスを取得するには、 TileUpdateManager.CreateTileUpdaterForApplication メソッドまたは TileUpdateManager.CreateTileUpdaterForSecondaryTile メソッドを呼び出します。

このクラスを作成すると、TileUpdater は特定のアプリまたはセカンダリ タイルにバインドされるため、このクラスのメソッドは、オブジェクト インスタンスがバインドされている 1 つのタイルにのみ影響します。

プロパティ

Setting

通知を通じてタイルを更新できるかどうかを示す値を取得します。

メソッド

AddToSchedule(ScheduledTileNotification)

ScheduledTileNotification をスケジュールに追加します。

Clear()

すべての更新プログラムを削除し、タイルがアプリのマニフェストで宣言された既定のコンテンツを表示します。

EnableNotificationQueue(Boolean)

タイルが最大 5 つの通知をキューに登録できるようにします。 これにより、すべてのタイル サイズで通知キューが有効になります。

EnableNotificationQueueForSquare150x150(Boolean)

タイルがメディア タイルで最大 5 つの通知をキューに登録できるようにします。

EnableNotificationQueueForSquare310x310(Boolean)

タイルが大きなタイルで最大 5 つの通知をキューに登録できるようにします。

EnableNotificationQueueForWide310x150(Boolean)

タイルがワイド タイルで最大 5 つの通知をキューに登録できるようにします。

GetScheduledTileNotifications()

タイルに対するスケジュールされた更新の一覧を取得します。

RemoveFromSchedule(ScheduledTileNotification)

予定されているタイルの更新をスケジュールから削除します。

StartPeriodicUpdate(Uri, DateTime, PeriodicUpdateRecurrence)

アップデーターがバインドされているタイルの一連の時間指定された更新を開始します。 更新コンテンツは、指定された Uniform Resource Identifier (URI) から取得されます。 更新指定した時刻に開始します。

StartPeriodicUpdate(Uri, PeriodicUpdateRecurrence)

アップデーターがバインドされているタイルの一連の時間指定されたコンテンツ変更をすぐに開始します。

StartPeriodicUpdateBatch(IIterable<Uri>, DateTime, PeriodicUpdateRecurrence)

アップデーターがバインドされているタイルで循環する一連の時間指定更新を開始します。 更新内容は、指定した Uri (Uniform Resource Identifier) の配列から取得され、更新は指定された時刻から開始され、その後の定期的な間隔で更新が発生します。

Note

この機能を使用するには、まず EnableNotificationQueue を呼び出してタイルの通知キューを有効にする必要があります。

StartPeriodicUpdateBatch(IIterable<Uri>, PeriodicUpdateRecurrence)

アップデーターがバインドされているタイルで循環する一連の時間指定更新を開始します。 更新内容は、指定された Uniform Resource Identifier (URI) の配列から取得されます。最初の更新は直ちに行われ、その後の定期的な間隔で後続の更新が発生します。

Note

この機能を使用するには、まず EnableNotificationQueue を呼び出してタイルの通知キューを有効にする必要があります。

StopPeriodicUpdate()

アップデーターがバインドされているタイルの現在の一連の時間更新を取り消します。

Update(TileNotification)

コンテンツまたは外観の変更をタイルに適用します。

適用対象