microsoft / WinUI-Gallery

This app demonstrates the controls available in WinUI and the Fluent Design System.
MIT License
2.74k stars 618 forks source link

Icon problem in the title barBug title #1512

Open tingjiangcao opened 5 months ago

tingjiangcao commented 5 months ago

Which version of the app?

WinUI 3 Gallery

Description

In "Windows + TAB" or "ALT + TAB" interface, the title bar icon shows the default icon instead of the app's icon.

Screenshots

Snipaste_2024-03-24_17-56-33

Currently need "AppWindow.SetIcon("xxx")" to solve the problem

I think after setting the icon in "Package.appxmainfest", the titlebar icon should be set at the same time, instead of setting it manually. (SDK optimization suggestion)

Windows version

No response

Additional context

No response

HO-COOH commented 3 months ago

Looks like it's already fixed. There is a appWindow.SetIcon("Assets/Tiles/GalleryIcon.ico"); in NavigationRootPage.xaml.cs

Fa1ki commented 2 months ago

WinUI 3 Gallery 2.4.3.0

There is also no icon in the task manager and in the hover window in the taskbar.

Screenshots Screenshot 2024-07-08 191743 Screenshot 2024-07-08 191924