Xamarin Forms Fundamentals

26 aug. 2022
Beginner
26,1K Views
4 min read  

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.

    Pages
    Description
    Content Page
    Contains a single view
    MasterDetailPage
    A page that has two panes for the page. Typically, the master will contain the likes of a menu with the detail the content.
    NavigationPage
    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.
    TabbedPage
    A container page. The TabbedPage acts as a container holding the content pages associated with each tab.
    CarouselPage
    A page that allows for sweeping across to show other views.
  2. 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
    Layouts
    Description
    StackLayout
    Positions the child elements in a line. Most commonly used layout.
    AbsoluteLayout
    A view that positions child layouts at specified positions using anchors to define the placing and size.
    RelativeLayout
    Positions the elements relative to each other using constraints.
    Grid
    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
    Cells
    Description
    EntryCell
    A cell containing a label and single-line entry element.
    SwitchCell
    The same as a switch, but with a label before it.
    TextCell
    A cell containing both a primary and a secondary text field.
    ImageCell
    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.

Share Article
About Author
Shailendra Chauhan (Microsoft MVP, Founder & CEO at Scholarhat by DotNetTricks)

Shailendra Chauhan is the Founder and CEO at ScholarHat by DotNetTricks which is a brand when it comes to e-Learning. He provides training and consultation over an array of technologies like Cloud, .NET, Angular, React, Node, Microservices, Containers and Mobile Apps development. He has been awarded Microsoft MVP 8th time in a row (2016-2023). He has changed many lives with his writings and unique training programs. He has a number of most sought-after books to his name which has helped job aspirants in cracking tough interviews with ease.
Learn to Crack Your Technical Interview

Accept cookies & close this