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

Xamarin Forms Fundamentals

  Author : Shailendra Chauhan
Posted On : 06 Mar 2017
Total Views : 3,701   
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 (0)
6 JUL
ASP.NET Core with Angular4 Development (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
5 JUL
NodeJS with Angular4 Development (Online)

08:00 PM-09:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Online)

03:30 PM-05:30 PM IST(+5.30 GMT)

Know More
1 JUL
ASP.NET MVC with Angular4 Development (Classroom)

8:00 AM-10:00 AM

Know More
1 JUL
ASP.NET Core with Angular4 Development (Classroom)

3:00PM 5:00PM

Know More
1 JUL
Xamarin Forms : Build Cross-platform Apps (Classroom)

3:00 PM 5:00 PM

Know More
1 JUL
MEAN Stack 2 Development (Classroom)

11:00 AM-12:30 PM

Know More
30 JUN
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5.30 GMT)

Know More
29 JUN
Hadoop Development cum Administration (Online)

7:00 AM-9:00AM IST(+5:30 GMT)

Know More
26 JUN
Xamarin Forms : Build Cross-platform Apps (Online)

9:30PM- 11:00PM IST(+5:30GMT)

6 JUN
ASP.NET MVC with Angular4 Development (Online)

09:00 PM-11:00 PM IST(+5.30 GMT)(TT)

3 JUN
ASP.NET MVC with Angular4 Development (Classroom)

4:00 PM-5:30 PM Weekend

20 MAY
Angular2 and Angular4 Development (Online)

08:00 AM-10:00 AM IST(+5.30 GMT) Weekend

20 MAY
NodeJS with Angular4 Development (Classroom)

5:30 PM-7:00 PM Weekend

8 MAY
ASP.NET MVC with Angular4 Development (Online)

07:00 AM-09:00 AM IST(+5:30 GMT) M/W/F

2 MAY
ASP.NET Core Development (Online)

07:00 AM - 09:00 AM IST( TUS, THR)

29 APR
ASP.NET MVC with Angular2 Development (Classroom)

9:30 AM-11:00 AM

BROWSE BY CATEGORY
 
 
LIKE US ON FACEBOOK
 
+