Xamarin.Forms
Xamarin.Forms copied to clipboard
Fix UWP threading exception
Description of Change
Removes an instance of an inverted dependency where creating a Xamarin.Forms object (including a Label with a font size) causes an exception, leading to crashes on user systems when done off the UI thread.
Issues Resolved
- fixes #8840
Platforms Affected
- UWP
Behavioral/Visual Changes
- UWP apps will not get unexpected crashes when creating Xamarin.Forms objects off the UI thread.
- There is a rare instance where sizing of fonts could be different (developer has changed ControlContentThemeFontSize manually and then not used font sizes).
Testing Procedure
Force the creation of the following object off the UI thread:
Label(FontSize = 10.)
This should not give an exception.
PR Checklist
- [ ] Targets the correct branch
- [ ] Tests are passing (or failures are unrelated)
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Review please?
Now that we're so close to the sunsetting of Xamarin.Forms unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR.
Please have a look at the evolution of Xamarin.Forms, .NET MAUI. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.
Again, thank you so much for being a contributor and Xamarin.Forms user!