LeftTwixWand / Inventory

New version of Microsoft Inventory sample, built on WinUI 3, using DDD and Clean Architecture approach
MIT License
71 stars 10 forks source link

To improve image conversion using IValueConverter and TaskNotifier #31

Closed LeftTwixWand closed 9 months ago

LeftTwixWand commented 1 year ago

At the current moment the image conversion works using ImageConverter class with async method to convert image from byte array to ImageSource. It's not the best coise to perform such conversion at the mapping time.

So, it would be better to implement somehow async ValueConverter and convert bytes to ImageSource on Presentation layer side. And one of such cases I found on the Stack Overflow: https://stackoverflow.com/questions/15003827/async-implementation-of-ivalueconverter

LeftTwixWand commented 9 months ago

I need to check this converter from MAUI world: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/converters/byte-array-to-image-source-converter

LeftTwixWand commented 9 months ago

Found a workaround by using default IValueConverter and IRandomAccessStream related commit: 8e62e8e