wpf Windows 8 动态磁贴图标背景颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18755773/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows 8 Live Tile Icon Background Color
提问by rockydant
I am developing a WPF application. My customers want to use it on Windows 8 and it's working correctly. But they are complaining me about the background color of the app's icon on Start Screen.
我正在开发一个 WPF 应用程序。我的客户想要在 Windows 8 上使用它并且它工作正常。但是他们向我抱怨开始屏幕上应用程序图标的背景颜色。
So can you please show me how to change it in Visual Studio or some tricks? I found some tuts on Google to customize it but using tools and I want to make it happen in Installer or Property of project...
那么你能告诉我如何在 Visual Studio 或一些技巧中改变它吗?我在 Google 上找到了一些 tuts 来自定义它,但使用工具,我想在项目的安装程序或属性中实现它......
Thanks
谢谢
回答by Anobik
Change app icon color from the App Manifest file.
从应用程序清单文件更改应用程序图标颜色。
Heres the app manifest portion where you can change in the image
这是应用清单部分,您可以在其中更改图像


In My case the bacground color is #464646 you can change it to any thing you want and update to the users :)
在我的情况下,背景颜色是#464646,您可以将其更改为您想要的任何内容并更新给用户:)
Because of this reason it is always advised by Microsoft to use Transparent Png logo and a uniform background color for app tile.
由于这个原因,Microsoft 始终建议对应用程序磁贴使用透明 Png 徽标和统一的背景颜色。
回答by KillAllYourSons
There is a similar question and answer: UWP Tile Background Color Not Workingby Kasper, but is not specific to Windows 8, for anyone looking for a UWP solution.
有一个类似的问题和答案:UWP Tile Background Color Not Workingby Kasper,但不特定于 Windows 8,适用于寻找 UWP 解决方案的任何人。
As the answerby Anobikstates, set the colour in the app manifest page. However, as it was found by Kasper, the value must be set in HEXfor it to work as expected.
由于答案通过Anobik状态,在设置应用清单页面的颜色。但是,正如Kasper发现的那样,必须以十六进制设置该值才能按预期工作。
回答by Eriawan Kusumawardhono
That background colot of app's icon on Windows 8 is the default behavior of Windows 8. It will display the background color of the app's icon using the "dominant" color of the app's icon. If your icon has dominant color of brown, it will display brown background.
Windows 8 上应用程序图标的背景颜色是 Windows 8 的默认行为。它将使用应用程序图标的“主导”颜色显示应用程序图标的背景颜色。如果您的图标的主色为棕色,它将显示棕色背景。
This is also the similar default behavior when hovering mouse on running application's icons on Windows 7's taskbar. To enhance the look, try change the application icon to use neutral colors or light colors instead of dark colors.
这也是将鼠标悬停在 Windows 7 任务栏上正在运行的应用程序图标上时的类似默认行为。要增强外观,请尝试更改应用程序图标以使用中性色或浅色而不是深色。
Or you can change the icon of your app to use single color's icon (such as white) on transparent background to reflect the flat theme icons of Windows Store apps in Windows 8, or use full rectangle icons as those games in Windows 8.
或者您可以更改您的应用程序的图标,在透明背景上使用单色图标(如白色)以反映 Windows 8 中 Windows 应用商店应用程序的平面主题图标,或者使用完整矩形图标作为 Windows 8 中的那些游戏。
Example:
例子:



