Please enable Javascript to correctly display the contents on Dot Net Tricks!

Xamarin Forms Fundamentals

 Print 
  Author : Shailendra Chauhan
Posted On : 06 Mar 2017
Total Views : 6,343   
Updated On : 06 Mar 2017
 

Xamarin Forms allows developers to build 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 build 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.



ABOUT AUTHOR

Shailendra Chauhan
Author, Architect, Corporate Trainer and Microsoft MVP

He is the author of some of most popular e-books which encompass technical Interview on Node.js Interview Questions and Answers, ASP.NET MVC Interview Questions and Answers, AngularJS Interview Questions and Answers and LINQ Interview Questions and AnswersKnow more...

Free Interview Books
 
COMMENTS
20 JAN
ASP.NET Core with Angular4 (Online)
07:00 AM-09:00 AM IST / 07:30 PM Central Time
20 JAN
ASP.NET MVC with Angular (Classroom)
05:00 PM to 07:00 PM IST (+5:30 GMT)
20 JAN
ASP.NET MVC with Angular4 (Online)
03:00 pm to 05:00 pm
20 JAN
Angular2+4 with Firebase (Classroom)
03:00 PM to 05:00 PM IST (+5:30 GMT)
16 JAN
Developing Microsoft Azure Solutions (Online)
07:00 AM-09:00 AM IST/ 07:30 PM -09:30 PM CST
16 JAN
React with Redux (Online)
07:00 AM-08:30 AM IST
15 JAN
Big Data Hadoop Developer (Online)
05:00 PM to 06:30Pm IST / 06:30AM to 08:00AM CST
8 JAN
ASP.NET Core with Angular4 (Online)
09:00 Pm to 11:00 Pm IST (+5:30Gmt)
8 JAN
Big Data Hadoop Developer (Online)
07:00 AM - 08:30 AM IST(+5:30 GMT)
16 DEC
ASP.NET MVC with Angular4 (Classroom)
10:00 AM - 01::00 PM IST(+5:30 GMT)
12 DEC
ASP.NET MVC with Angular4 (Online)
09:00 PM - 11:00 PM IST(+5:30 GMT)
2 DEC
Developing Microsoft Azure Solutions (Online)
07:00 AM-09:00 AM IST / 08:30 PM Central Time
2 DEC
Angular2+4 with Firebase (Online)
10:30 AM-12:30 PM IST(+5.30 GMT)
27 NOV
ASP.NET Core (Online)
07:00 AM to 09:00 AM IST (+5:30 GMT)
11 NOV
ASP.NET MVC (Online)
08:00 AM-10:00 AM IST / 09:30 PM To 11:30 PM(CST)
SUBSCRIBE TO OUR YOUTUBE CHANNEL
 
 
 
LIKE US ON FACEBOOK
 
+