Add Icon for ToolWindow in WPF

How to add an icon for ToolWindow in WPF?

As well 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">
+3
source share
2 answers

I know that it’s old, but now I went through the same problem and I decided to contribute.

You can not use the icon with WindowStyle "ToolWindow", but you can use "SingleBorderWindow" and property ResizeMode value "NoResize". You now have the same "ToolWindow" behavior, but with an icon.

+5
source

Have you tried the Window.Icon property ?

0
source

Source: https://habr.com/ru/post/1718697/


All Articles