Open mikebattista opened 2 years ago
The proper method to use would be LoadIconMetric, for both large and small icons. This should make it DPI aware as well. Alternatively, WinUIEx could migrate to AppWindow.SetIcon of course.
Can you not pass the large icon size by using GetSystemMetricsForDpi
or use LoadIconMetric this will require adding to the manifest
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
Original:
GetSystemMetric:
LoadIconMetric with smallicon (can't get large to work 🤔)
With a 256x256 .ico, AppWindow.SetIcon results in a sharp taskbar icon while setting TaskBarIcon in XAML or with Icon.FromFile results in a blurry icon.
Could the 16x16 dimensions provided below be to blame?
https://github.com/dotMorten/WinUIEx/blob/8c84bc9bf0c4c07c71e9724bb1434998ade82a5c/src/WinUIEx/Icon.cs#L47