Nam G VU
Nam G VU

Reputation: 35444

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

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

Answers (2)

Prince Ashitaka
Prince Ashitaka

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

Will Eddins
Will Eddins

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

Related Questions