The icon in the taskbar is looking very ugly in my WPF application.
The designer sent me some PNGs like:
32x32, 64x64, 96x96, 128x128, 192x192, 256x256, 512x512
I had the same problem, it was not working even with a multi-sized .ico file. Setting the icon directly in the Window resulted in a pixelated icon.
I managed to fix it with this code-behind for the application window:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Uri iconUri = new Uri("pack://application:,,,/Images/myicon.ico", UriKind.RelativeOrAbsolute); //make sure your path is correct, and the icon set as Resource
this.Icon = BitmapFrame.Create(iconUri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
//etc.
}
Icon file is multi-sized, this worked for me in WPF - Windows 10.
You can convert your .png icon into a multi-sized .ico file here http://icoconvert.com/