BadgeUpdateManager.GetTemplateContent(BadgeTemplateType) 메서드

정의

배지 업데이트를 위해 사용자 지정할 수 있도록 미리 정의된 배지 템플릿 중 하나의 XML 콘텐츠를 가져옵니다.

public:
 static XmlDocument ^ GetTemplateContent(BadgeTemplateType type);
 static XmlDocument GetTemplateContent(BadgeTemplateType const& type);
public static XmlDocument GetTemplateContent(BadgeTemplateType type);
function getTemplateContent(type)
Public Shared Function GetTemplateContent (type As BadgeTemplateType) As XmlDocument

매개 변수

type
BadgeTemplateType

배지 템플릿 유형(문자 모양 또는 숫자)입니다.

반환

템플릿 XML을 포함하는 개체입니다.

예제

다음 예제에서는 GetTemplateContent를 사용하여 숫자 배지의 콘텐츠를 가져오는 방법을 보여줍니다.

var Notifications = Windows.UI.Notifications;

var badgeXml = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badgeNumber);
var badgeAttributes = badgeXml.getElementsByTagName("badge");
badgeAttributes[0].setAttribute("value", "7");

설명

전체 XML 페이로드를 직접 만드는 대신 기본 템플릿을 가져와서 DOM(문서 개체 모델) 조작 함수를 사용하여 변경하려는 콘텐츠 부분을 사용자 지정할 수 있습니다. 이 XML을 BadgeNotification 에 패키지하고 이 클래스의 다른 메서드를 통해 만든 BadgeUpdater 를 통해 타일로 보냅니다.

배지 요소 및 특성에 대한 설명은 배지 스키마를 참조하세요.

적용 대상

추가 정보