Reputation: 35444
I have set the icon to use for my application but my form still having the default icon on it. How can I select its icon to be the one set for the application? Please help
Upvotes: 8
Views: 8156
Reputation: 8763
You need to set the Icon for the window explicitly like
<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>
Upvotes: 7
Reputation: 13917
Setting the icon for the application should carry over to all windows, except when overridden.
You may be running the application through Visual Studio, in which case you will be running vshost.exe
. Try running your application directly from the Release directory, and you should see the icon appear in your Windows.
Upvotes: 7