none
RTM Known Issue: Getting logos from SecondaryTile returns null despite them being set RRS feed

  • Question

  • Cannot retrieve the logos that are set on a secondary tile. All logo properties are null despite them being set to valid values.

    Affected SecondaryTile logo properties...

    • VisualElements.Square71x71Logo
    • VisualElements.Square150x150Logo
    • VisualElements.Square310x310Logo
    • VisualElements.Wide310x150Logo
    • LockScreenBadgeLogo

    Pinning works fine, all the logos correctly appear...

    // Create a new secondary tile
    SecondaryTile tile = new SecondaryTile(...);
    
    // Set all the logos
    tile.VisualElements.Square71x71Logo = new Uri("ms-appx:///Assets/Square71x71Logo.png");
    ...
    
    // Pin the tile
    await tile.RequestCreateAsync();
    
    // RESULT: Tile successfully pinned, correct logos appear

    But when you retrieve the tile, the logos are no longer initialized...

    // Retrieve the tile
    SecondaryTile tile = (await SecondaryTile.FindAllAsync()).First(i => i.TileId.Equals("myTile"));
    
    // And get the background color
    Uri logo = tile.VisualElements.Square71x71Logo;
    
    // BUG: Retrieved logo is null, not what we set

    Friday, September 4, 2015 10:53 PM
    Moderator

Answers

  • Status: Fixed for TH2 (fixed in build 10567)

    Workaround: There is no simple workaround. If you depend on retrieving the logos of your secondary tiles, we would recommend storing the logo uri's in your app's own data when you pin the tile (your app is setting the logos, thus your app knows what logos are on each tile).

    It's important to note that setting the logos works correctly. It's only retrieving the logos that is broken. So you can still pin a secondary tile and your logos will appear correctly!


    Friday, September 4, 2015 10:56 PM
    Moderator