You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The animation methods in Forms automatically handle UI thread marshaling for the user. Unfortunately, they do this using the static Device.IsInvokeRequired and Device.BeginInvokeOnMainThread, which are incompatible with multi-window applications on some platforms. To address this, we can add a dispatcher to the IAnimatable interface to use for these thread checks.
API
On Xamarin.Forms.IAnimatable, add IDispatcher Dispatcher { get; }
Backward Compatibility
Anyone who has implemented the IAnimatable interface will need to add an IDispatcher to their implementation.
Difficulty : Low
The main implemnentation of IAnimatable in Forms is VisualElement, which already has an IDispatcher. The other implementations (Tizen's NavigationDrawer and a couple of test classes) will need to add it as well. The explicit type check in the DoAction method of AnimationExtensions will need to be removed, and the use of the static Device methods will need to be replaced with Dispatcher.
The text was updated successfully, but these errors were encountered:
Description
Add IDispatcher to IAnimatable interface.
The animation methods in Forms automatically handle UI thread marshaling for the user. Unfortunately, they do this using the static Device.IsInvokeRequired and Device.BeginInvokeOnMainThread, which are incompatible with multi-window applications on some platforms. To address this, we can add a dispatcher to the IAnimatable interface to use for these thread checks.
API
On
Xamarin.Forms.IAnimatable
, addIDispatcher Dispatcher { get; }
Backward Compatibility
Anyone who has implemented the IAnimatable interface will need to add an IDispatcher to their implementation.
Difficulty : Low
The main implemnentation of IAnimatable in Forms is VisualElement, which already has an IDispatcher. The other implementations (Tizen's NavigationDrawer and a couple of test classes) will need to add it as well. The explicit type check in the DoAction method of AnimationExtensions will need to be removed, and the use of the static Device methods will need to be replaced with Dispatcher.
The text was updated successfully, but these errors were encountered: