为什么桌面图标与资源管理器图标不同?

发布于 2024-09-30 10:59:32 字数 423 浏览 1 评论 0原文

由于某种原因,当我的应用程序被放到桌面上时,我的图标的一个非常旧的版本不断出现。在 Windows 资源管理器中(在所有缩放级别),图标正确的是程序集图标。我在 XAML Window.Icon 和项目设置中指定了正确的项目。 我已从我能想到的所有文件夹中删除了旧版本的图标,但它仍然显示。此外,在拖放时,会显示错误的图标。 (在稍微透明的预览窗口中)

我尝试清理和重建,我尝试手动删除obj文件夹...... 原来的错误图标是 16x16。我将新版本构建为 32x32,因为在桌面上 16x16 太小了。 根据 msdn 文档 (http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx),每个 .ico 文件都应该包含所有较小的大小。 我还检查了我是否更改了调试和发布配置的图标。

感谢您的任何想法! :)

For some reason, a very old version of my icon keeps showing up when my application is dropped on the desktop. In the windows explorer (in all zooming levels) the icons is correctly the assembly icon. I specified the correct item in both XAML Window.Icon and in the project settings.
I have deleted the old version of my icon from all folders I can think of, but it still shows up. Also while drag and dropping, the wrong icon is shown. (in the slightly transparent preview window)

I tried cleaning and rebuilding, I tried deleting the obj folder manually...
The original, wrong icon was 16x16. I have built the new version as 32x32, because on the desktop 16x16 is too small.
According to the msdn docs (http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx), each .ico file is supposed to incorporate all smaller sizes anyway.
I also checked that I changed the icon for both debug and release configuration.

Thanks for any ideas! :)

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

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

发布评论

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

评论(2

牵你手 2024-10-07 10:59:32

这可能是 IconCache 的问题吗?尝试删除 %localappdata%\IconCache.db 并重新启动 Explorer.exe。

Could this be a problem with the IconCache? Try deleting %localappdata%\IconCache.db and restarting Explorer.exe.

迟月 2024-10-07 10:59:32

检查 EXE 项目的 Visual Studio 属性窗口 - 您可以指定在编译时写入 EXE 的图标。这与运行时分配给 XAML 窗口的图标是分开的。

Check the Visual Studio properties window for the EXE's project -- you can specify the icon that's written into the EXE at compile time. This is separate from the icon that's assigned to the XAML window at run time.

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