Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select icon for a WPF to be the icon of the application?

Tags:

icons

wpf

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

like image 414
Nam G VU Avatar asked Oct 28 '10 05:10

Nam G VU


2 Answers

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.

like image 109
Will Eddins Avatar answered Oct 13 '22 04:10

Will Eddins


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>
like image 38
Prince Ashitaka Avatar answered Oct 13 '22 04:10

Prince Ashitaka