Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

Fix UWP threading exception

Open charlesroddie opened this issue 4 years ago • 3 comments
trafficstars

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)

charlesroddie avatar Feb 26 '21 21:02 charlesroddie

/azp run

rmarinho avatar Mar 01 '21 13:03 rmarinho

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Mar 01 '21 13:03 azure-pipelines[bot]

Review please?

charlesroddie avatar Mar 23 '21 19:03 charlesroddie

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!

jfversluis avatar Apr 25 '24 07:04 jfversluis