AppNotificationButton.IsToolTipSupported Methode

Definition

Gibt einen Wert zurück, der angibt, ob QuickInfos für App-Benachrichtigungsschaltflächen auf dem aktuellen Gerät unterstützt werden.

public:
 static bool IsToolTipSupported();
 static bool IsToolTipSupported();
public static bool IsToolTipSupported();
function isToolTipSupported()
Public Shared Function IsToolTipSupported () As Boolean

Gibt zurück

Boolean

bool

True, wenn QuickInfos unterstützt werden; Andernfalls false.

Beispiele

Im folgenden Beispiel wird die Überprüfung veranschaulicht, ob die Stile der App-Benachrichtigungsschaltfläche unterstützt werden.

var button = new AppNotificationButton("Reply")
    .AddArgument("action", "reply");

if (AppNotificationButton.IsToolTipSupported())
{
    button.SetToolTip("Click to reply.");
}

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")
    .AddButton(button)
    .BuildNotification();

AppNotificationManager.Default.Show(notification);

Die resultierende XML-Nutzlast, wenn das dringende Szenario unterstützt wird:

<toast>
    <visual>
        <binding template='ToastGeneric'>
            <text>Notification text.</text>
        </binding>
    </visual>
    <actions>
        <action content='Reply' arguments='action=reply' hint-toolTip='Click to reply'/>
    </actions>
</toast>

Hinweise

Mit der AppNotificationButton.SetToolTip-Methode können Sie eine QuickInfo-Zeichenfolge bereitstellen, die angezeigt wird, wenn der Benutzer mit der Maus über die Schaltfläche zeigt. Dieses Feature wird nur für Windows 10 Build 19041 und höher unterstützt. Mit dieser Methode können Sie zur Laufzeit ermitteln, ob QuickInfos auf dem aktuellen Gerät unterstützt werden.

Eine Anleitung zur Verwendung der AppNotificationBuilder-APIs zum Erstellen der Benutzeroberfläche für App-Benachrichtigungen finden Sie unter App-Benachrichtigungsinhalte.

Referenzinformationen zum XML-Schema für App-Benachrichtigungen finden Sie unter Inhaltsschema für App-Benachrichtigungen.

Gilt für: