locked
What is the difference between Forms-Xaml-Page and Forms-Xaml -View in xamarin cross-platform RRS feed

  • Question

  • User216636 posted

    What is the difference between Forms-Xaml-Page and Forms --Xaml-View in Xamarin cross-platform item? Is there any difference in approach for developing XAML page there?

    Wednesday, May 24, 2017 9:23 AM

Answers

  • User320634 posted

    hai @Shubho Forms-Xaml-Page would be the base you would use for your pages. Forms --Xaml-View is about nesting views so you can do things like adding padding/swap out container areas/what you have.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 24, 2017 10:31 AM
  • User183142 posted

    Xamarin Forms Xaml Page - use Pages when you want to create different screens (pages) in Xamarin Forms application like for instance LoginPage or UserProfilePage. This is just base class and entry point for a single screen in application. Forms.Page is representation of platform specific: * on iOS - represents a View Controller * in Windows Phone - represents Page * on Android - each page takes up the screen like an Activity BUT this Forms.Pages are not Activities

    You can have different types of pages like below:

    Xamarin Forms Xaml View - use Views when you want to create some parts of UI like for instance panel with label that you know you will use on different screens (repeatedly) in your applications. Good comparison can be to User Control available on Universal Windows Platform. You can create such control (for instance layout with two buttons) and use it in different Pages in your app. More examples - Android View or iOS UIView. This is just a part of the screen. There is also one more imporant thing - Xaml View can be embedded in Xaml Page.

    Example of Xaml View:

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 24, 2017 10:39 AM

All replies

  • User320634 posted

    hai @Shubho Forms-Xaml-Page would be the base you would use for your pages. Forms --Xaml-View is about nesting views so you can do things like adding padding/swap out container areas/what you have.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 24, 2017 10:31 AM
  • User183142 posted

    Xamarin Forms Xaml Page - use Pages when you want to create different screens (pages) in Xamarin Forms application like for instance LoginPage or UserProfilePage. This is just base class and entry point for a single screen in application. Forms.Page is representation of platform specific: * on iOS - represents a View Controller * in Windows Phone - represents Page * on Android - each page takes up the screen like an Activity BUT this Forms.Pages are not Activities

    You can have different types of pages like below:

    Xamarin Forms Xaml View - use Views when you want to create some parts of UI like for instance panel with label that you know you will use on different screens (repeatedly) in your applications. Good comparison can be to User Control available on Universal Windows Platform. You can create such control (for instance layout with two buttons) and use it in different Pages in your app. More examples - Android View or iOS UIView. This is just a part of the screen. There is also one more imporant thing - Xaml View can be embedded in Xaml Page.

    Example of Xaml View:

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, May 24, 2017 10:39 AM
  • User216636 posted

    Thank you guys... :)

    Thursday, May 25, 2017 10:37 AM