3

How can I add an Icon for ToolWindow in WPF?

Just as

<Window x:Class="WPFApp.Account"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Accounting Information"
    FontFamily="Calibri" FontSize="13"
    WindowStyle="ToolWindow" ResizeMode="NoResize"
    Width="600" Height="600">
Sauron
  • 16,668
  • 41
  • 122
  • 174

2 Answers2

7

I know that is old but I passed through the same problem now days and I decide to contribute a solution.

You can't use icon with the WindowStyle 'ToolWindow', but you can use 'SingleBorderWindow' and in property ResizeMode the value 'NoResize'. Now you have the same behavior of 'ToolWindow' but with icon.

idenardi
  • 600
  • 1
  • 6
  • 20
0

Have you tried the Window.Icon property?

Szymon Rozga
  • 17,971
  • 7
  • 53
  • 66