xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.64k stars 1.88k forks source link

[Bug] Device.IsInvokeRequired is not changing to false after running the method on mainthread #15756

Open ghost opened 1 year ago

ghost commented 1 year ago

Description When loading a page asynchronously to a secondary window using a dispatcher on button click.then after running the method on method in secondary window.the Device.IsInvokeRequired Property does not changing to false.

Note : Checked with latest Xamarin.Forms 5.0.0.2599-pre1(5.0.0 Service Release 15 Pre Release 1)

Steps to Reproduce Click the button. Click the CheckisOnMainthread button twice. open output window

Sample SecondWindow.zip

Expected Behavior Device.isInvokeRequired should be false after running the method on Mainthread.

Actual Behavior Device.IsInvokRequired remains true even after running on MainThread.

Screenshots image

ghost commented 12 months ago

Hi team, Any update regarding this