windows-phone-8.1secondary-live-tile

How to prevent logo scaling for secondary tiles?


I'm creating a secondary tile and the only logo I have is quite small (32x32 pixels I think).

This means the logo is scaled for the secondary tile and looks terrible:

terribly scaled logo

Is there any way to prevent the logo from being scaled so it looks more like a normal live tile?

nicely scaled logo

I've tried specifying the tile size as TileSize.Square71x71 in the constructor, but this simply throws an exception.

Any ideas?


Edit

The exception I get is:

{Windows.UI.Xaml.UnhandledExceptionEventArgs}
Exception = {"Value does not fall within the expected range."}
Message = "The parameter is incorrect.\r\n"

But I think that makes sense because I think secondary tiles only accept two sizes in the constructor, TileSize.Square150x150 and TileSize.Wide310x150.


Edit 2

The code that throws the exception is:

var secondaryTile = new SecondaryTile("myId",
    "sweet name",
    "sweet args",
    myLogoUri,
    TileSize.Square71x71);

If I change the last line to TileSize.Square150x150); no exception is thrown, but then I'm left with the larger tile.


Solution

  • Ended up going for a work around.

    I'm placing the icon on a transparent background which is the right size, thus preventing scaling.

    If anyone has cleaner solution I'd be stoked to hear it!