Universal Windows Platform

Back when Microsoft introduced UWP, the only available documentation were either from the official docs.microsoft.com or Channel9, so I made some notes and reminders and made my own documentation in this post.
UWP
I'd be lying if this was my first time with UWP since most of its structures shares alot from WinRT and I already have tried it with Windows Phone before.
Limitations
Very limited and/or no support for System.Reflections
Check your project portability by running .Net Portability Analyzer and check the report.
Some breaking changes in this platform can made it impossible to fully ported to UWP and require some workaround. Please take a look at the Desktop Bridge conversion process if you got a greenlight to upgrade your project to UWP. I've warned you.
Synchronizationcontext
- use .current at times
- running task in ui thread
Gridview & ListView
- How it renders
- Rendering problem when asynchronous load is called
ContainerContentChanging
XAML EventTrigger
- Only supports "loaded" event. Any other else will return exception
- Some alternatives:
VisualStateManager.VisualStateGroupsandWindows.Compositionmethods.
VisualStateManager
- Call the visual state when neeeded.
Composition
- Get UIElement's Compositor
- Create a storyboard.
0x00001007 Exception
- Exception name : MoAppCrash
- Main Cause : DesignTime causing a broken compilation on release build.
- Solution : Remove design properties
0x802B000A Stowed Exception
- Exception name : Stowed Exception
- Main Cause :
If you've ever got this specific exception only in the Release and/or Store Build, just revert any changes you made in the XAML code. I'm dead fucking serious.
This is the infamous one-of-the-kind XAML exception that won't give you any useful information other than "yeah, your program crashed and you are fucked now". The fact that it only ever got mentioned exactly once in StackOverflow and won't ever shown up in debug mode shows you just how rare it is.
An untraceable exception doesn't mean we can't trace it. Here are some chekcs you can do to trace the actual problem:
- Did you straight up copy the control template / styles and paste it in your resources? Check some controls that might not be supported in the minimum version
- Did you use a built-in themeresource that use fluent design? Better jack the fuck up your minimum build version
- Using Windows UI Library? Try to remove it and all their trace in your project.