Share via


AppNotificationButton.IsToolTipSupported 메서드

정의

현재 디바이스의 앱 알림 단추에 도구 팁이 지원되는지 여부를 나타내는 값을 반환합니다.

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

반환

Boolean

bool

True이면 도구 설명이 지원됩니다. 그렇지 않으면 false입니다.

예제

다음 예제에서는 앱 알림 단추 스타일이 지원되는지 확인하는 방법을 보여 줍니다.

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

긴급 시나리오가 지원되는 경우 결과 XML 페이로드:

<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>

설명

AppNotificationButton.SetToolTip 메서드를 사용하면 사용자가 단추 위로 마우스를 놓을 때 표시되는 도구 설명 문자열을 제공할 수 있습니다. 이 기능은 Windows 10 빌드 19041 이상에서만 지원됩니다. 이 메서드를 사용하면 현재 디바이스에서 도구 팁이 지원되는지 런타임에 확인할 수 있습니다.

AppNotificationBuilder API를 사용하여 앱 알림에 대한 UI를 만드는 방법에 대한 지침은 앱 알림 콘텐츠를 참조하세요.

앱 알림에 대한 XML 스키마에 대한 참조 정보는 앱 알림 콘텐츠 스키마를 참조하세요.

적용 대상