Xamarin Forms Fundamentals

26 Aug 2022

Xamarin training allows developers to build a cross-platform mobile app using the common UI pages, layouts, views, controls, and design patterns. At runtime, each Xamarin Forms UI element will be mapped to its native equivalent element in each platform, so that truly native UI can be built and rendered.

Xamarin Forms Fundamentals

  1. Page

    The page represent cross-platform mobile app screen. A page contains layouts and views to display app data and handle user interaction.

    A Xamarin Forms page represents a View Controller in iOS or a Page in Windows Phone/UWP or an activity in Android. Xamarin forms have following different types of pages for displaying UI elements.

    Content Page
    Contains a single view
    A page that has two panes for the page. Typically, the master will contain the likes of a menu with the detail the content.
    A page that contains a navigation bar. Pages are kept on a stack and can be jumped between. The Navigation bar can have navigation buttons as well as a title.
    A container page. The TabbedPage acts as a container holding the content pages associated with each tab.
    A page that allows for sweeping across to show other views.

    Xamarin views are the UI elements/controls displayed on the user interface, such as labels, buttons and text entry boxes. The basic views are shown in fig.

    Xamarin Forms Views

    Xamarin forms views can be aligned vertically and horizontally using VerticalOptions and HorizontalOptions.

    Xamarin Forms Views Alignment
  3. Layouts

    Layouts are containers for Xamarin views and put the views into logical structures.

    Xamarin Forms Layouts
    Positions the child elements in a line. Most commonly used layout.
    A view that positions child layouts at specified positions using anchors to define the placing and size.
    Positions the elements relative to each other using constraints.
    Arranges multiple views in rows and columns just like table.
  4. Cells

    Xamarin Forms cells are specialized elements used for customization of items in a list. These describe how each item in a list should be drawn. Cells is used with ListViews and TableViews for items customization.

    Xamarin Forms Cells
    A cell containing a label and single-line entry element.
    The same as a switch, but with a label before it.
    A cell containing both a primary and a secondary text field.
    A text cell that also contains an image.
What do you think?

Thank you for your time, I hope you enjoyed this article and found it useful. Please add your comments and questions below. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

Learn to Crack Your Technical Interview

Accept cookies & close this