BadgeUpdater 클래스

정의

업데이트 도구가 바인딩된 특정 타일에 배지 오버레이를 업데이트.

public ref class BadgeUpdater sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class BadgeUpdater final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class BadgeUpdater final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class BadgeUpdater
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class BadgeUpdater
Public NotInheritable Class BadgeUpdater
상속
Object Platform::Object IInspectable BadgeUpdater
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 예제에서는 Update 를 사용하여 호출 앱의 타일에 숫자 배지 업데이트를 보내는 방법을 보여 드립니다.

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

설명

이 개체의 instance 얻으려면 BadgeUpdateManager.CreateBadgeUpdaterForApplication 또는 BadgeUpdateManager.CreateBadgeUpdaterForSecondaryTile 메서드를 호출합니다.

만들 때 BadgeUpdater는 특정 앱 또는 보조 타일에 바인딩되므로 이 클래스의 메서드는 개체 instance 바인딩된 단일 타일에만 영향을 줍니다.

메서드

Clear()

업데이트 프로그램에서 바인딩된 타일에서 배지를 제거합니다.

StartPeriodicUpdate(Uri, DateTime, PeriodicUpdateRecurrence)

업데이트 관리자가 바인딩된 웹 리소스에서 배지에 대한 일련의 시간 제한 업데이트를 시작합니다. 업데이트 지정된 시간에 시작됩니다. 주기적 업데이트에서는 웹 리소스(http/https)만 허용됩니다.

StartPeriodicUpdate(Uri, PeriodicUpdateRecurrence)

즉시 시작하여 업데이트 관리자가 바인딩된 웹 리소스에서 배지에 대한 일련의 시간 지정된 업데이트를 시작합니다. 주기적 업데이트에서는 웹 리소스(http/https)만 허용됩니다.

StopPeriodicUpdate()

업데이트 프로그램의 바인딩된 배지에 대한 현재 일련의 시간 제한 업데이트를 취소합니다.

Update(BadgeNotification)

배지의 문자 모양 또는 번호에 변경 사항을 적용합니다.

적용 대상

추가 정보