internal void SetBadge(BadgeValue value) { badgeValueControl.Value = value; // This might have affected branding height, so notification needs to re-display to adjust for the available size Reshow(); }
public object ConvertBack(object value, Type targetType, object parameter, string language) { if (value is string) { return(BadgeValue.Parse(value as string)); } return(BadgeValue.Parse(null)); }
public object Convert(object value, Type targetType, object parameter, string language) { BadgeValue badgeValue = value as BadgeValue; if (badgeValue == null) { return(Visibility.Collapsed); } if (badgeValue.HasBadge()) { return(Visibility.Visible); } return(Visibility.Collapsed); }
/// <summary> /// Applies a change to the badge's glyph or number. /// </summary> /// <param name="badgeNotification"></param> public void Update(BadgeNotification badgeNotification) { if (badgeNotification.Content == null) { throw new NullReferenceException("badgeNotification.Content must be provided."); } IXmlNode badgeNode = badgeNotification.Content.SelectSingleNode("/badge"); if (badgeNode == null) { throw new NullReferenceException("<badge> element must be provided in the xml"); } var valueAttribute = badgeNode.Attributes.GetNamedItem("value"); if (valueAttribute == null) { throw new NullReferenceException("<badge> element must have a \"value\" attribute specified."); } _previewTile.SetBadge(BadgeValue.Parse(valueAttribute.InnerText)); }
/// <summary> /// Removes the badge from the tile that the updater is bound to. /// </summary> public void Clear() { _previewTile.SetBadge(BadgeValue.Default()); }
public static void Set(BadgeValue badgeValue, User user) { }
public static void Set(BadgeValue badgeValue) { }