locked
update secondary tile with a TileTemplate RRS feed

  • Question

  • Hi,

    In my app, the application tile needs to be a square image(150 X150), but the secondary tile needs to be a wide image(310 X 150)?

    To create a square application tile, I just enter a value for Tile Logo, but leave Tile Wide Logo empty in my app package.appxmanifest. Is there another ways to create it?  I was able to create a static wide secondary tile, but if I want to update it using a TileTemplate(tileWideImageAndText) described in http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.tiletemplatetype.aspx.  It fails and I don’t get any errors.  The secondary tile is just not updating.  I am using Notifications.TileUpdateManager.createTileUpdaterForSecondaryTile(). 

    In order to update the secondary tile using a TileTemplate, I had to add a value for Tile Wide Logo.  But then, the main application tile becomes a wide tile. 

    What should I do to accomplish both square application tile and a wide secondary tile with a TileTemplate tileWideImageAndText? Thank you very much.

    Saturday, February 11, 2012 12:17 AM

Answers

  • Hi Leo,

    Yes and yes.

    Download the Secondary Tiles sample.

    For the first scenario add this at the top:

        var uriWideLogo = new Windows.Foundation.Uri("ms-resource:images/tile-sdk.png");
        

    and then after setting the small logo set the wide one:

        tile.wideLogo = uriWideLogo;

    You will see that it shows the text and the image!

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, February 16, 2012 8:06 PM
    Moderator

All replies

  • Hi Leo,

    There is a lot of information in your post.  Is the question simply, "Can I have a Wide Secondary tile and restrict the Primary tile to a square tile"?

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, February 16, 2012 3:35 PM
    Moderator
  • Hi Jeff,

    Sorry for the confusion.  You got most of my question.  But more specifically,  “Can I have a Wide (TileWideImageAndText, not just a wide image) Secondary tile and restrict the Primary tile to a square tile?”  I was not able to do that.  If it’s possible, can you give me some sample codes?  Thank you very much.


    Leo

    Thursday, February 16, 2012 6:32 PM
  • Hi Leo,

    Yes and yes.

    Download the Secondary Tiles sample.

    For the first scenario add this at the top:

        var uriWideLogo = new Windows.Foundation.Uri("ms-resource:images/tile-sdk.png");
        

    and then after setting the small logo set the wide one:

        tile.wideLogo = uriWideLogo;

    You will see that it shows the text and the image!

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, February 16, 2012 8:06 PM
    Moderator