Roman Jasek
Roman Jasek

Reputation: 121

Xamarin - mixing Forms and Storyboards

Is it possible to mix iOS Storyboards and Xamarin Forms within one application? I have a bunch of views that are easier to be created in Forms, but some which are heavily customized so we would need to create some of them in native code.

I would like to use Storyboards to create the native parts, but can't seem to find a way to navigate from a Forms page to a Storyboard and vice versa.

I don't mind doing it from code, just need to know the direction to look into and if it's even possible.

Upvotes: 1

Views: 982

Answers (2)

Roman Jasek
Roman Jasek

Reputation: 121

Thanks to Rafael Steil's answer. I looked at the links and a few more samples.

Notably:

And I created a sample project to show the back-and-forth navigation between Xamarin Forms and pages created in Storyboards. You can find it over here: Xamarin Forms Mixed with Native

Upvotes: 1

Rafael Steil
Rafael Steil

Reputation: 4697

You can create native views using the concept of Custom Renderers (see links below). The idea is that you create a Xamarin Forms Control that's shared between all platforms and which old common properties (like colors, general data etc), and do the native rendering on the iOS/Android/WP projects.

So, for your storyboard, you can create it usign Xamarin.iOS, and render using a Custom Renderer. The link posted by @GSerg in the comments have some information and examples, but you can take a closer look at the oficial documentation as well:

Also, for more real world examples you can take a look at the Xamarin Forms XLabs project.

Upvotes: 1

Related Questions