BadgeUpdater.Update(BadgeNotification) Метод

Определение

Применяет изменение к глифу или номеру эмблемы.

public:
 virtual void Update(BadgeNotification ^ notification) = Update;
void Update(BadgeNotification const& notification);
public void Update(BadgeNotification notification);
function update(notification)
Public Sub Update (notification As BadgeNotification)

Параметры

notification
BadgeNotification

Объект , предоставляющий новое определение XML для эмблемы.

Примеры

В следующем примере показано использование Update для отправки числового обновления индикатора событий на плитку вызывающего приложения.

// Get an XML DOM version of a specific template by using GetTemplateContent.
var badgeXml = BadgeUpdateManager.GetTemplateContent(BadgeTemplateType.BadgeNumber);
var badgeAttributes = badgeXml.GetElementsByTagName("badge");
badgeAttributes[0].Attributes.Where(a => a.LocalName.ToString() == "value").First().NodeValue = "7";

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

// Send the badge notification to the app's tile.
BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badgeNotification);

Применяется к

См. также раздел