Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Device.StartTimer different on WP8

$
0
0

Is the Device.StartTimer API supposed to be callable from a background thread to start a UI timer? It works on iOS but I get a cross-thread exception on WP8. The behavior is also different. On iOS and Android, it starts off an NSTimer or System.Threading.Timer, but on WP8 it uses a DispatcherTimer.

This puts on different behavior such that StartTimer cannot be safely called from a background thread and the resulting timer ticks on WP8 are on the UI thread and not on a threadpool thread like the others.

System.Threading.Timer is available on WP8 and should be used there instead of DispatcherTimer... maybe also on iOS to make sure the behavior matches 100%.

This needs to be unified so the behavior is the same.
Thanks


Viewing all articles
Browse latest Browse all 58056

Trending Articles