TileUpdateManager クラス

定義

スタート メニュー タイルの変更と更新に使用する TileUpdater オブジェクトを作成します。 このクラスでは、システム提供のタイル テンプレートの XML コンテンツへのアクセスも提供されるため、タイルの更新に使用するためにそのコンテンツをカスタマイズできます。

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

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

次の例は、タイル テンプレートの XML コンテンツを取得するために使用される GetTemplateContent と、アプリのタイルに通知を送信する CreateTileUpdaterForApplication を示しています。

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);
}

注釈

これは静的ファクトリ クラスであり、インスタンス化は必要ありません。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1607 14393 GetForUser

メソッド

CreateTileUpdaterForApplication()

TileUpdater の新しいインスタンスを作成して初期化します。これにより、呼び出し元アプリのタイルの外観を変更できます。

CreateTileUpdaterForApplication(String)

呼び出し元アプリと同じパッケージ内の別のアプリに属するタイルの TileUpdater の新しいインスタンスを作成して初期化します。 TileUpdater を使用すると、開発者はそのタイルの外観を変更できます。

CreateTileUpdaterForSecondaryTile(String)

TileUpdater の新しいインスタンスを作成して初期化します。これにより、セカンダリ タイルの外観を変更できます。 タイルは、呼び出し元アプリまたは同じパッケージ内の他のアプリに属することができます。

GetForUser(User)

指定したユーザーの新しい TileUpdateManagerForUser を作成して初期化します。これにより、特定のユーザーのタイルの外観またはコンテンツを変更できます。

GetTemplateContent(TileTemplateType)

タイルの更新用にカスタマイズできるように、定義済みのタイル テンプレートの 1 つの XML コンテンツを取得します。

Note

このメソッドが Windows 8 システムで呼び出されると、 バージョン 1 のテンプレートが返されます。 このメソッドがWindows 8.1 システムで呼び出されると、バージョン 2 のテンプレートが返されます。 ただし、アプリがマニフェストで Windows 8 の互換性を指定している場合、このメソッドは バージョン 1 テンプレートを返します。

適用対象

こちらもご覧ください