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

Xamarin.Forms.Init()

$
0
0

Hello!

I think I must be missing something very basic here.

Within a PCL class library I wish to call Device.StartTimer. I do so in the generic PCL (Portable) assembly, not in the e.g. PCL.WP8 platform specific assembly. However, when I do so, I get the error:

[System.InvalidOperationException] = {System.InvalidOperationException: You MUST call Xamarin.Forms.Init(); prior to using it.
at Xamarin.Forms.Device.get_PlatformServices()
at Xamarin.Forms.Device.StartTimer(TimeSpan interval, Func`1 callback)

Can anybody show me what I'm doing wrong?

Many thanks.


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>