Xamarin.Forms With XAML MvvM Binding for Phones & Tablets

yasiralijavedyasiralijaved PKUniversity ✭✭

Hi all,

I want to develop a mobile app which has two different designs for phones(Android, iPhone) and tablets(Android, iPads). I want to use Xamarin.Forms with XAML MvvM Binding. Can anybody suggest me how to achieve this goal in a reliable way.
Note: I want to avoid to design the UI using code classes. I just want to develop the complete UI using XAML with MvvM Binding.

Posts

  • PaulDistonPaulDiston USUniversity ✭✭✭✭

    Hi,

    You may find the following useful :-

    developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/platform-specifics/

    Hope this helps.

    Paul Diston

  • yasiralijavedyasiralijaved PKUniversity ✭✭
    edited February 2015

    Thanks Paul. From the example for XAML in above page, its clear that Idiom is only useful to handle the small UI changes. What if we want to display the the List-Detail like data?

    This would be like two screens for phones, one for List and second for displaying the detail. And for Tablet, there would be a single screen with List on the Left pane and Detail on the Right pane of Screen.

    This kind of design pattern is available for both Android(Multi-pane Layouts) and iOS(Split View Controller).

  • PaulDistonPaulDiston USUniversity ✭✭✭✭

    Hi,

    One approach might be that you split off pages into phone and tablet versions, creating custom controls along the way to increase reuse and then when navigating navigate to the appropriate page based on the Idiom. This does introduce a small amount of logic in a navigation service but would simplify things.

    Paul Diston

  • yasiralijavedyasiralijaved PKUniversity ✭✭

    Yea i think this is the only approach which is reasonable so far. But i will wait for others to comment here and share any better approach.

    Thanks a lot Paul.

Sign In or Register to comment.