简体   繁体   English

在DesktopAppConverter UWP中使用自定义图标资源

[英]Using custom icon assets with DesktopAppConverter UWP

I'm using DesktopAppConverter to convert my WPF application into a windows store compatible app. 我正在使用DesktopAppConverter将我的WPF应用程序转换为Windows商店兼容的应用程序。 Right now I'm able to get the AppX built but the problem is to do with my application assets. 现在我能够构建AppX,但问题在于我的应用程序资产。

At the moment, DesktopAppConverter is taking my existing Icon (which looks great in WPF) and using it to somehow create all the different Assets at different resolutions for the UWP app. 目前,DesktopAppConverter正在使用我现有的Icon(在WPF中看起来很棒)并使用它以某种方式为UWP应用程序创建不同分辨率的所有不同资产。 The icons it creates are coming out looking terrible, really blocky and clearly upscaled. 它创造的图标看起来很可怕,非常块状,并且明显放大了。

The way I'm looking at it is that there's 2 options. 我正在看它的方式是有两种选择。

1 - I specify a really large Icon file in my WPF app that might somehow end up being scaled better inside DesktopAppConverter. 1 - 我在我的WPF应用程序中指定了一个非常大的Icon文件,它最终可能会在DesktopAppConverter中更好地扩展。 The problem here is that with a large resolution Ico file, I end up with a crazy large file (Ico's don't compress very well from what I understand). 这里的问题是,使用大分辨率的Ico文件,我最终会得到一个疯狂的大文件(Ico不会根据我的理解压缩得很好)。

2 - I specify a folder of correctly scaled assets (created using UWP Tile Generator) when building through DesktopAppConverter. 2 - 在通过DesktopAppConverter构建时,我指定了正确缩放资源的文件夹(使用UWP Tile Generator创建)。 This is what I'd like to do. 这就是我想做的。 I don't really want to be tweaking my Assets every time. 我真的不想每次调整我的资产。

The 3rd choice is the one I'm heading towards, but don't really want to do. 第三个选择是我要前往的那个,但不是真的想做。 It involves building with AppX, then replacing the assets, then using MakeAppX, then re-signing with the SignTool. 它涉及使用AppX构建,然后替换资产,然后使用MakeAppX,然后使用SignTool重新签名。 All of that seems really unnecessary, so I'm hoping someone from MSFT can let me know I'm missing something fundamental. 所有这一切似乎都是不必要的,所以我希望MSFT的某个人能让我知道我错过了一些基本的东西。

Thanks. 谢谢。

The easiest way to handle the visual assets for your app package is to use the package manifest editor in Visual Studio 2017. 处理应用程序包的可视资源的最简单方法是使用Visual Studio 2017中的包清单编辑器。

在此输入图像描述

To use it for your converted app, create an empty UWP project and add the output of the conversion (incl. your appx manifest) in this project. 要将其用于转换的应用程序,请创建一个空的UWP项目,并在此项目中添加转换的输出(包括您的appx清单)。 Now you can use the editor to manage the visual assets, build your packages for store submission and much more. 现在,您可以使用编辑器来管理可视资产,为商店提交构建包等等。

Here is a document that describes the process: https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net 这是一个描述该过程的文档: https//docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net

Thanks, Stefan Wick - Windows Developer Platform 谢谢,Stefan Wick - Windows开发人员平台

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM