我已经设置了应用程序要使用的图标,但我的窗体上仍然显示默认图标。如何选择它的图标为应用程序设置的那个图标呢?请帮忙。
<Window x:Class="FFTP.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Icon="App.ico">
.
.
.
</Window>
设置应用程序图标应该传递到所有窗口,除非被覆盖。
您可能会通过Visual Studio运行应用程序,在这种情况下,您将运行vshost.exe
。尝试直接从发布目录运行应用程序,您应该在Windows中看到图标出现。
Icon
属性在外部指定它。 - Prince Ashitaka