public static TileInformation CreateFromTileSetting(AppTileSettings.TileSettings tileSettings) { var ti = new TileInformation(); ti.OverwriteWithTileSettings(tileSettings); return(ti); }
public void OverwriteWithTileSettings(AppTileSettings.TileSettings tileSettings) { if (tileSettings != null) { TileSettingsInstance = tileSettings; Title = tileSettings.Title; BackgroundImage = tileSettings.FrontPhoto; // other methods are not yet supported. } }
private void UpdatePrimaryAppIcon(AppTileSettings.TileSettings ts) { var type = ts.StyleType; if (string.IsNullOrEmpty(type)) { // make sure tile pushes are on. ts.FrontPhoto = new Uri("/4thBackground_173.png", UriKind.Relative); SelectedMainIcon = null; } else { ts.ShellFrontPhotoPath = null; if (type == "static") { ts.FrontPhoto = new Uri("/4thBackground_173.png", UriKind.Relative); // disable live tile pushes. } else if (type == "classic") { ts.FrontPhoto = new Uri("/ClassicTile.png", UriKind.Relative); // disable live tiles. } else { // enable live tile pushes. } SelectedMainIcon = type; } AppTileManager.Instance.UpdateOrPin(ts); }