Search code examples
c#windowsxamlwin-universal-appuwp

Make app icon on task bar have a transparent background (UWA)


I am making a Universal Windows App and I want my apps icon on the task bar to have a transparent background so it isn't in a coloured box.

A lot of Microsoft's own stock apps are like this (Mail, Photos, Xbox etc) and I know it can be done because I did it by accident. But the icons I was using were too big and when I used correct sized ones it stopped working. I've tried using the old too large icons again and it still doesn't work.

enter image description here

Setting the tile background in the apps manifest just makes the background the users theme colour rather than actually transparent so I must of done something else, all of my assets for the Square 44x44 Logo of course have transparent backgrounds but I just get the tile background colour where there should be nothing.


Solution

  • You need to use the "altform-unplated" qualifier in your icon's filename. For example:

    SmallLogo.targetsize-32_altform-unplated.png
    

    If you really want to be thorough... For Square44x44Logo in your manifest, you should have 6 versions of the icon (normal, high contrast black, and high contrast white, x3 for unplated versions) for each of the following target sizes: 16, 20, 24, 30, 32, 36, 40, 48, 60, 64, 80, 96, and 256.

    For example, here's 256:

    SmallLogo.targetsize-256.png
    SmallLogo.targetsize-256_contrast-black.png
    SmallLogo.targetsize-256_contrast-white.png
    SmallLogo.targetsize-256_altform-unplated.png
    SmallLogo.targetsize-256_altform-unplated_contrast-black.png
    SmallLogo.targetsize-256_altform-unplated_contrast-white.png
    

    That's a lot of PNGs.