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

How to jump from Native Page back to Xamarin.Forms

$
0
0

I got 2 forms, 1 is Xamarin.Form (Xamarin.Forms.Platform.WinPhone.FormsApplicationPage), 1 is native windows phone page (PhoneApplicationPage).

Xamarin.Form will navigate to native windows phone page by some button click.

However, I am stuck on how to jump from native windows phone page back to Xamarin.forms.

private void ButtonBack_OnClick(object sender, RoutedEventArgs e) {          
      //NavigationService.GoBack() -- I don't want to use back method.
      NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));      
    }

When I do above, it complained "can't create more than one Applicaton instance".

 public MainPage() {
      InitializeComponent();
      SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;

      global::Xamarin.Forms.Forms.Init();
      LoadApplication(new MobileApps.App());        
    }

Above is the standard init code for xamarin form.

Any idea?

Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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