2

Right now, I'm generating custom tiles for my app. But I'd like to change the title of the tile as well, being dynamically (e.g., I can show the current location).

In WP8 you were able to set the Title and the BackTitle, but these parameters seems to be missing in Universal Apps.

Any idea on how to do this? I think it's only possible to set Branding to BadgeIcon or app Title? I'd like to set the (Front)Title to a string, and back title to nothing.

/// RENDERING THE TILES
string WideFrontTile = await RenderWideFront(WeatherData);
string MediumFrontTile = await RenderMediumFront(WeatherData);
string WideBackTile = await RenderWideBack(WeatherData);
string MediumBackTile = await RenderMediumBack(WeatherData);

// FRONT TILES
ITileWide310x150Image WideFrontContent = TileContentFactory.CreateTileWide310x150Image();
WideFrontContent.Image.Src = WideFrontTile;
ITileSquare150x150Image MediumFrontContent = TileContentFactory.CreateTileSquare150x150Image();
MediumFrontContent.Image.Src = MediumFrontTile;
WideFrontContent.Square150x150Content = MediumFrontContent;

// BACK TILES
ITileWide310x150Image WideBackContent = TileContentFactory.CreateTileWide310x150Image();
WideBackContent.Image.Src = WideBackTile;
ITileSquare150x150Image MediumBackContent = TileContentFactory.CreateTileSquare150x150Image();
MediumBackContent.Image.Src = MediumBackTile;
WideBackContent.Square150x150Content = MediumBackContent;


// Clear all tiles, push new tiles
TileUpdateManager.CreateTileUpdaterForApplication().Clear();
TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);
TileUpdateManager.CreateTileUpdaterForApplication().Update(WideBackContent.CreateNotification());
TileUpdateManager.CreateTileUpdaterForApplication().Update(WideFrontContent.CreateNotification());

Kind regards, Niels

Eldar Dordzhiev
  • 5,105
  • 2
  • 22
  • 26
Niels
  • 2,496
  • 5
  • 24
  • 38
  • I ended up rendering the titles into the image, while turning Branding to Branding.None. – Niels Sep 07 '14 at 13:05

1 Answers1

1

Just set the attribute "branding":

    var TileMgr = TileUpdateManager.CreateTileUpdaterForApplication();
    TileMgr.Clear();
    var tileTemplate = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150Image);

    // Quitamos el nombre de la app.
    XmlElement tmp = tileTemplate.GetElementsByTagName("visual")[0] as XmlElement;
    tmp.SetAttribute("branding", "none");
    var notification = new TileNotification(tileTemplate);
    TileMgr.Update(notification);
Cabuxa.Mapache
  • 762
  • 1
  • 7
  • 19