BadgeUpdateManager.CreateBadgeUpdaterForSecondaryTile(String) 메서드

정의

보조 타일에서 배지의 모양이나 콘텐츠를 변경할 수 있는 BadgeUpdater의 새 instance 만들고 초기화합니다. 타일은 동일한 패키지의 호출 앱 또는 다른 앱에 속할 수 있습니다.

public:
 static BadgeUpdater ^ CreateBadgeUpdaterForSecondaryTile(Platform::String ^ tileId);
 static BadgeUpdater CreateBadgeUpdaterForSecondaryTile(winrt::hstring const& tileId);
public static BadgeUpdater CreateBadgeUpdaterForSecondaryTile(string tileId);
function createBadgeUpdaterForSecondaryTile(tileId)
Public Shared Function CreateBadgeUpdaterForSecondaryTile (tileId As String) As BadgeUpdater

매개 변수

tileId
String

Platform::String

winrt::hstring

타일의 고유 ID입니다.

반환

tileID로 식별된 타일에 배지 업데이트를 보내는 데 사용할 개체입니다.

예제

다음 예제에서는 ID가 "SecondaryTile.Dynamic"인 보조 타일에 숫자 배지 알림을 보내는 방법을 보여 줍니다.

var Notifications = Windows.UI.Notifications;

// Define the badge content
var badgeNotification = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badgeNumber);
var badgeAttributes = badgeNotification.getElementsByTagName("badge");
badgeAttributes[0].setAttribute("value", "6");

// Create the notification based on the XML content.
var badge = new Notifications.BadgeNotification(badgeNotification);

// Create a secondary tile updater, passing it the ID of the tile.
Notifications.BadgeUpdateManager.createBadgeUpdaterForSecondaryTile("SecondaryTile.Dynamic");

// Send the notification to the secondary tile.
tileUpdater.update(tileNotification);

적용 대상

추가 정보