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

依然范特西╮ 提交于 2019-12-20 10:26:09

问题


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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/31735562/make-app-icon-on-task-bar-have-a-transparent-background-uwa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!