54: UWP WTF Moment Number 4
I can’t help it. Couple days ago, I encountered another UWP WTF moments. There are solutions to all, but it is just not natural. Making me question if UWP gets any love at all.
One Drive Screws up GetThumbnailAsync
If you have used StorageFile, you know there is a function “GetThumbnailAsync”, which gives you a thumbnail. This works fine if the file (image) is anywhere except a folder under One Drive.
The most ridiculous thing after I was having this issue is: I found a StackOverflow question 3 years ago!
So it is NOT a new problem, and no one from Microsoft even bothers to fix it, for 3 freaking years!!!
FileSavePicker does NOT support default extension
Even though there is a property called “DefaultFileExtension“, it has no use. The official document even asks NOT to use it.
It asks you to use something, but if you go to the other page, which does NOT explain really how it works.
It comes out it is a known issue to Microsoft, here is a work around:
UWP C# FileSavePicker -> DefaultFileExtension – Stack Overflow
There is NO way to specify location from FileSavePicker
We cannot set a starting location for this dialog other than a list of preset options:
It means if I really want a dialog that allows me to save to anywhere, I will have to build my own. That is really something I never have to (not saying I can’t, but it is so neccessary) from years of writing Windows desktop applications. My quick search finds a possible option, but I haven’t tried it yet, as in my case, unlike the previous 2, this is not a deal breaker. But still, very disappointed.
In the end
These 3 WTF moments apparently are caused by the permission constraint of UWP being UWP. This framework seems to be built in a way that tries to do a lot, but ends up being surprised and eventually pushing away many people. I am not sure what Microsoft next destkop idea is, I have heard project reunion, which brings Win32 and UWP apps together. Hopefully they will get things done right next time.