ClintL
ClintL

Reputation: 1453

Xamarin.Forms Tablet and Phone

Has anyone seen Xamarin.Forms examples for code that supports both tablet and phone UIs without doing dependency injection to fragments?

I would like to make use of the screen space, and I have built the entire application thus far with a ContentView -> ViewModel architecture but I cannot seem to find any example Xamarin.Forms code dealing specifically with universal UIs.

Upvotes: 0

Views: 1110

Answers (1)

Sten Petrov
Sten Petrov

Reputation: 11040

See How to create a tablet UI with multiple ContentPages on one screen at the same time with Xamarin.Forms?

The gist of it is to create ContentView-based UI implementations and then decide if you'd show them wrapped inside a ContentPage by themselves (on a phone) or show two or more of them together in a single ContentPage (on a tablet).

You can also leverage [OnPlatform][1] to choose between the two in a declarative manner.

Upvotes: 2

Related Questions