public ImportNode ( [ node, [ deep ) : IXmlNode | ||
node | [ | |
deep | [ | |
Résultat | IXmlNode |
private static void UpdateTileParts(NotifyMessage notify, XmlDocument tileXml) { var squareTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150Text01); var squareTileTextAttributes = squareTileXml.GetElementsByTagName("text"); squareTileTextAttributes[0].AppendChild(squareTileXml.CreateTextNode(notify.Message)); var node = tileXml.ImportNode(squareTileXml.GetElementsByTagName("binding").Item(0), true); tileXml.GetElementsByTagName("visual").Item(0).AppendChild(node); if (!string.IsNullOrWhiteSpace(notify.Image)) { var img = tileXml.GetElementsByTagName("image"); ((XmlElement)img[0]).SetAttribute("src", notify.Image); ((XmlElement)img[0]).SetAttribute("alt", string.Empty); } }