Open maxkatz6 opened 1 year ago
I'm not quite sure if that's a job of the asset loader. Especially since scaling can be changed by moving a window to a different monitor.
I want to be able to disable or enable this feature. So if I have localized images for example, I want to decide when to show which one.
Some of these features intersect the changes I made for #12107.
IconBitmap
. The same technique can be applied to any collection of bitmaps, not just icons.BitmapResourceExtension
and the existing theme variant resource system.We should move toward refactoring bitmap usage to a BitmapSource like WPF's version. The BitmapSource is then responsible for providing the correct bitmap representation.
AssetLoader just needs to expose a list of assets at given location and we need a way to read bitmap headers without loading the whole bitmap.
Describe the solution you'd like
Usage: Create files:
Reference file in the XAML (or with AssetLoader):
Asset loader should automatically detect current scaling and choose the correct file.
At minimum should be supported:
Describe alternatives you've considered
OnPlatform markup extension will be part of 11.0. Similarly, developers can define their own custom markup extensions. Media Queries also are planned to solve similar problem. Gladly, asset loader extension, won't conflict with these other features, and can be used together.