Example #1
0
 /// <summary>
 /// Generate the VisualElementsManifest XML file
 /// </summary>
 /// <param name="backgroundColor">Tile background color (hexadecimal format)</param>
 /// <param name="foregroundColor">Tile text color (Light or Dark)</param>
 /// <param name="showNameOnMediumTile">Show the name on the medium tile</param>
 /// <returns>XML file content</returns>
 public static string GenerateXMLVisualElements(Color backgroundColor,
                                                TileForegroundText foregroundColor, bool showNameOnMediumTile)
 {
     return(Resources.VisualElementsManifest
            .Replace("{BackgroundColor}", ColorTranslator.ToHtml(backgroundColor))
            .Replace("{ShowNameOnSquare150x150Logo}", showNameOnMediumTile ? "on" : "off")
            .Replace("{ForegroundText}", foregroundColor.ToString().ToLower())
            .Replace("{Square150x150Logo}", AssetsConstants.AssetsFolderName + '\\'
                     + AssetsConstants.MediumTileFileName)
            .Replace("{Square70x70Logo}", AssetsConstants.AssetsFolderName + '\\'
                     + AssetsConstants.SmallTileFileName));
 }