다음을 통해 공유


BadgeUpdateManager.CreateBadgeUpdaterForApplication 메서드

정의

오버로드

CreateBadgeUpdaterForApplication()

호출 앱 타일에서 배지의 모양이나 콘텐츠를 변경할 수 있는 BadgeUpdater의 새 instance 만들고 초기화합니다.

CreateBadgeUpdaterForApplication(String)

지정된 앱 타일의 배지(일반적으로 패키지에 있는 다른 앱의 타일)에 대한 BadgeUpdater의 새 instance 만들고 초기화합니다. BadgeUpdater를 사용하면 해당 배지의 모양이나 콘텐츠를 변경할 수 있습니다.

CreateBadgeUpdaterForApplication()

호출 앱 타일에서 배지의 모양이나 콘텐츠를 변경할 수 있는 BadgeUpdater의 새 instance 만들고 초기화합니다.

public:
 static BadgeUpdater ^ CreateBadgeUpdaterForApplication();
/// [Windows.Foundation.Metadata.Overload("CreateBadgeUpdaterForApplication")]
 static BadgeUpdater CreateBadgeUpdaterForApplication();
[Windows.Foundation.Metadata.Overload("CreateBadgeUpdaterForApplication")]
public static BadgeUpdater CreateBadgeUpdaterForApplication();
function createBadgeUpdaterForApplication()
Public Shared Function CreateBadgeUpdaterForApplication () As BadgeUpdater

반환

앱 타일의 배지에 변경 내용을 보내는 데 사용할 개체입니다.

특성

예제

다음 예제에서는 호출 앱의 타일에 숫자 배지 업데이트를 보내는 데 사용되는 CreateBadgeUpdaterForApplication을 보여 줍니다.

function sendBadgeNotification() {
    var Notifications = Windows.UI.Notifications;
    var badgeXml;
    var badgeAttributes;

    // Get an XML DOM version of a specific template by using getTemplateContent.
    badgeXml = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badgeNumber);
    badgeAttributes = badgeXml.getElementsByTagName("badge");
    badgeAttributes[0].setAttribute("value", "7");

    // Create a badge notification from the XML content.
    var badgeNotification = new Notifications.BadgeNotification(badgeXml);

    // Send the badge notification to the app's tile.
    Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotification);
}

추가 정보

적용 대상

CreateBadgeUpdaterForApplication(String)

지정된 앱 타일의 배지(일반적으로 패키지에 있는 다른 앱의 타일)에 대한 BadgeUpdater의 새 instance 만들고 초기화합니다. BadgeUpdater를 사용하면 해당 배지의 모양이나 콘텐츠를 변경할 수 있습니다.

public:
 static BadgeUpdater ^ CreateBadgeUpdaterForApplication(Platform::String ^ applicationId);
/// [Windows.Foundation.Metadata.Overload("CreateBadgeUpdaterForApplicationWithId")]
 static BadgeUpdater CreateBadgeUpdaterForApplication(winrt::hstring const& applicationId);
[Windows.Foundation.Metadata.Overload("CreateBadgeUpdaterForApplicationWithId")]
public static BadgeUpdater CreateBadgeUpdaterForApplication(string applicationId);
function createBadgeUpdaterForApplication(applicationId)
Public Shared Function CreateBadgeUpdaterForApplication (applicationId As String) As BadgeUpdater

매개 변수

applicationId
String

Platform::String

winrt::hstring

업데이트하려는 배지가 있는 타일의 고유 ID입니다.

반환

애플리케이션 타일의 배지에 변경 내용을 보내는 데 사용할 개체입니다.

특성

설명

applicationId로 식별된 앱은 호출자와 동일한 패키지에 속해야 합니다.

추가 정보

적용 대상