PEHLAJ
PEHLAJ

Reputation: 10126

Xamarin Forms - Navigate to Native Activity from xaml.cs

In my Xamarin Forms project, I have launcher activity i.e. MainActivity. I am starting Shared Application App.xaml.cs from MainActivity using following line in onCreate method.

LoadApplication(new App());

I am using CustomTabbedPage, each TabbedPage has its own xaml and xaml.cs files. In one of the xaml.cs files. I need to navigate to native activity that is placed under Droid module.

await Navigation.PushModalAsync(new HomeView());

Everything works fine if I navigate from one xaml view to other but I am unable to navigate to native screens from any xaml.cs file.

Upvotes: 2

Views: 651

Answers (1)

Jesse Jiang
Jesse Jiang

Reputation: 965

Xamarin Forms doesn't support navigation to a Native Android View. But you can create a empty PCL page and use NativeView in page's custom renderer.

Upvotes: 2

Related Questions