Hi
I have a published application built on Xamarin.Forms for Android and iOS and unrelated version for Windows Store. Recently I dove into migrating my Windows Store version to Xamarin.Forms. Windows Store version serves Windows 8.1 and later (does not install on Windows 8).
I had to use the Xamarin.Forms version 1.4.4.6932 due to know issues widely discussed in another thread (http://forums.xamarin.com/discussion/comment/155698) and my problems are not related.
Now to the topic. I have a pair of annying issues and it would be nice if they get discussed.
In order to process the application lifecycle I override some methods of Xamarin.Forms.Application i.e. OnStart, OnSleep, OnResume. These work fine on Android and iOS but on Windows only OnStart is called. OnSleep and OnResume do not get called at all. As a workaround I handle the corresponding events of Windows.UI.Xaml.Application but this is not very nice and is not cross platform at all. Is this a known issue or by design?
In my application I do not use the Xamarin.Forms navigation infrastructure like NavigationPage etc. Let me not waste your time describing my reasons. The issue arises with the Windows.Phone.UI.Input.HardwareButtons.BackPressed event which I need to handle and need to provide the BackPressedEventArgs.Handled result. Xamarin.Forms initialization seems to subscribe for the event as well and overwrites the BackPressedEventArgs.Handled value I provide. As a workaround I had to subscribe for the event AFTER the call for Xamarin.Forms.Forms.Init. To my mind the Xamarin.Forms does not need to provide the Windows.Phone.UI.Input.HardwareButtons.BackPressed event BackPressedEventArgs.Handled result unless an instance of NavigationPage is created. Am I right?
Best regards,
Eugene.