AppNotificationButton.ToolTip Property


Gets or sets the tool-tip text for the app notification button.

 property Platform::String ^ ToolTip { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring ToolTip();

void ToolTip(winrt::hstring value);
public string ToolTip { get; set; }
var string = appNotificationButton.toolTip;
appNotificationButton.toolTip = string;
Public Property ToolTip As String

Property Value




A string containing the tool-tip text.


The following example demonstrates the use of this property to set the tool-tip for the app notification button.

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

if (AppNotificationButton.IsToolTipSupported())
    button.ToolTip = "Click to reply.";

var notification = new AppNotificationBuilder()
    .AddText("Notification text.")


The resulting XML payload if the urgent scenario is supported:

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


You can also set the tool-tip text by calling the AppNotificationButton.SetToolTip method.

Tool-tip text is only supported for on Windows 10 Build 19041 and later. Call AppNotificationButton.IsToolTipSupported to determine at runtime if tool-tips are supported on the current device.

For guidance on using the AppNotificationBuilder APIs to create the UI for app notifications, see App notification content.

For reference information about the XML schema for app notifications, see App notification content schema.

Applies to