/// <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)); }
public SecondaryTileData(string id, string displayName) { this.arguments = string.Empty; this.background = new Color32(0, 0, 0, 0); this.backgroundColorSet = false; this.displayName = displayName; this.foregroundText = TileForegroundText.Default; this.lockScreenBadgeLogo = string.Empty; this.lockScreenDisplayBadgeAndTileText = false; this.phoneticName = string.Empty; this.roamingEnabled = true; this.showNameOnSquare150x150Logo = true; this.showNameOnSquare310x310Logo = false; this.showNameOnWide310x150Logo = false; this.square150x150Logo = string.Empty; this.square30x30Logo = string.Empty; this.square310x310Logo = string.Empty; this.square70x70Logo = string.Empty; this.tileId = id; this.wide310x150Logo = string.Empty; }
public SecondaryTileData(string id, string displayName) { arguments = ""; background = new UnityEngine.Color32(0, 0, 0, 0); backgroundColorSet = false; this.displayName = displayName; foregroundText = TileForegroundText.Default; lockScreenBadgeLogo = ""; lockScreenDisplayBadgeAndTileText = false; phoneticName = ""; roamingEnabled = true; showNameOnSquare150x150Logo = true; showNameOnSquare310x310Logo = false; showNameOnWide310x150Logo = false; square150x150Logo = ""; square30x30Logo = ""; square310x310Logo = ""; square70x70Logo = ""; tileId = id; wide310x150Logo = ""; }
/// <summary> /// <para>Constructor for SecondaryTileData, sets default values for all members.</para> /// </summary> /// <param name="id">Unique identifier for secondary tile.</param> /// <param name="displayName">A display name for a tile.</param> public SecondaryTileData(string id, string displayName) { this.arguments = string.Empty; this.background = new Color32((byte) 0, (byte) 0, (byte) 0, (byte) 0); this.backgroundColorSet = false; this.displayName = displayName; this.foregroundText = TileForegroundText.Default; this.lockScreenBadgeLogo = string.Empty; this.lockScreenDisplayBadgeAndTileText = false; this.phoneticName = string.Empty; this.roamingEnabled = true; this.showNameOnSquare150x150Logo = true; this.showNameOnSquare310x310Logo = false; this.showNameOnWide310x150Logo = false; this.square150x150Logo = string.Empty; this.square30x30Logo = string.Empty; this.square310x310Logo = string.Empty; this.square70x70Logo = string.Empty; this.tileId = id; this.wide310x150Logo = string.Empty; }