0

I'm trying to embed a XAML page created with Xamarin.Forms in my native Xamarin.Mac application.

How can I achieve that?

zx485
  • 28,498
  • 28
  • 50
  • 59

1 Answers1

0

Check out this guide for embedding XAML in native UI. The approach is very similar to iOS, there is an analogous CreateViewController extension method available in Xamarin.Mac:

nativeViewController = new MyPage().CreateViewController();
_navigation.PushViewController(nativeViewController, true);
Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
  • Thank you Martin! What is the declared type of **_navigation**? The only corresponding type I find is UINavigationController which is available only on iOS. Thanks – Christine Etoke Oct 04 '18 at 11:50