简体   繁体   中英

Setting size of Application Icon in WPF

I have a code wherein i put an image on my Application icon:

Title="Test WPF" Height="600" Width="800" WindowStartupLocation="CenterScreen" Closing="WindowClosing" Icon="ICON.PNG"

I know that the icon size is like 12 x 12 or 24 x 24.

Is it possible to have the Application Icon customize on size? like 40 x 24?

You can use the WindowChrome class to customize the non-client area of a window. In this page there is a section specifically mention the application icon and title.

The application icon and title are not displayed by the WindowChrome class; they have to be added to the border as custom content.

This is an example on how to do that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM