Reputation: 1453
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
Reputation: 11040
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