我可以将.svg文件设置为MAUI应用图标

发布于 2025-01-31 19:43:25 字数 210 浏览 1 评论 0原文

我无法将.svg文件设置为我的应用图标。我将.svg文件放在资源文件夹中,并将其“构建操作”属性更改为Mauiicon和我写的.csproj文件: [1]: https://i.sstatic.net/8ydao.png

I can't set my .svg file as my app icon. I put the .svg file inside the Resources folder and changed its "Build Actions" properties to MauiIcon and in the .csproj file I wrote:
[1]: https://i.sstatic.net/8YDAo.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

铁轨上的流浪者 2025-02-07 19:43:25

尝试以下步骤

  1. 使其成为基本的SVG文件,您可以使用PNG文件并使用工具将其转换为SVG文件。

  2. 调用文件与默认的so appicon.svg相同,在您的.csproj

    中编辑

     < mauiicon includs =“资源\ appicon.svg” />    
     

请参阅 https://github.com/dotnet/maui/sissues/3755555555555555555555,issuecomment-1063138958

Try the following steps

  1. Make it a basic svg file , you can take a png file and use tool to convert it to svg file .

  2. Call the file the same as the default so appicon.svg, edit in your .csproj

    <MauiIcon Include="Resources\appicon.svg" />    
    

Refer to https://github.com/dotnet/maui/issues/3755#issuecomment-1063138958 .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文