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

Windows 8.1 / Windows phone 8.1 / Windows 10 related issues

$
0
0

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.

  1. 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?

  2. 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.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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