You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GeneratedIconSource.Size currently needs to be set to different values at different Windows scaling levels. I'd like it to be DPI agnostic.
Why is this needed:
Currently if you set GeneratedIconSource.Size to 16 this works fine at 100% scaling in Windows 11, but causes the icon text to not generate at 200% scaling. If you set the size to 32 then the text generates fine at 200% scaling but is tiny at 100% scaling. It would be nice if this property was DPI-aware so it could just be set to 16 and would work at any scaling.
For which Platform:
All
WPF
WinUI
Uno
Core
Anything else we need to know?
I did a quick fix in my app by removing Size from the XAML and adding the following to the code:
Forgot to mention, I think GeneratedIconSource.TextMargin might also not be DPI aware I didn't investigate that too much. GeneratedIconSource.FontSize on the other hand does automatically scale with Windows DPI scaling.
What would you like to be added:
GeneratedIconSource.Size currently needs to be set to different values at different Windows scaling levels. I'd like it to be DPI agnostic.
Why is this needed:
Currently if you set GeneratedIconSource.Size to 16 this works fine at 100% scaling in Windows 11, but causes the icon text to not generate at 200% scaling. If you set the size to 32 then the text generates fine at 200% scaling but is tiny at 100% scaling. It would be nice if this property was DPI-aware so it could just be set to 16 and would work at any scaling.
For which Platform:
Anything else we need to know?
I did a quick fix in my app by removing Size from the XAML and adding the following to the code:
this.TrayIcon.Size = (int)Math.Round(16 * VisualTreeHelper.GetDpi(this).PixelsPerDip);
The text was updated successfully, but these errors were encountered: