Application Page Structure in Xamarin

We are going to talk about the structure of Xamarin pages in some depth. So let’s get started. There must be a page with the layout and views. Before moving to the next step, first we want to know basically what a layout is. Layout is a container that allows you to add more than one content into your page application.

There are different types of pages in Xamarin.

type

Content page is the basic and simple page of your application.

Tabbed Page is just like a Content page with some additional tabs on the bottom or top that allows you to trigger some event.

Master Detailed Page has a menu or you can call it a hamburger that allows you to go to the different pages of your application.

Navigation Page allows you to navigate between different pages.

Carousal Page allows you to slide forward or backward. If you are well familiar with Bootstrap and CSS then you know what carousal is. If not then don’t be worried because we’re going to start from scratch.

Layouts in Xamarin

In Xamarin we have different type of layouts. Let's talk about them one by one.

  • Layouts is just like a container. The first layout is Stack Layout. It allows us to go to the vertical or horizontal side of screen.

  • Second is absolute layout. So what it's going to do is place view at a specific position. It works on the x axis and y axis.

  • Third is the relative layout. What it'll do is place view relative to another; it is used in the page margins of the application.

  • The last is the Table type layout; that is the Grid layout.

Basic Controls in Xamarin

Image

Whenever you want to add some picture in your application then you'll use that control.

Label

Label is just like a Text Block if you're familiar with the XAML. If not then it's just a textbox that cannot be editable

Map

Map is very useful when you want to display some sort of Bing or Google Map Services in to your application.

Web View

As the name implies web view is used to display content of website in to your application.

Button

Button is used to handle some trigger or it will allows us to initiate an event.

Search Bar

Of course it allows you to search something in different pages.

Date Picker

Picks a date for you.

Editor

Editor is a multi-line text field.

Entry

Entry is a single line text field

Progress Bar

It is used when you want the user to wait until the result comes.

List View

List View contains list of items for example if you open your mail box the list view holds your inbox messages.

Some more tools of Xamarin are available below.
  • Slider
  • Switch
  • Stepper
  • List View
  • Picker
  • Table View

The most important control we have not talked about is cell.

There are four types of cell.

  1. Text Cell
  2. Image Cell
  3. Entry Cell
  4. Switch Cell

Text Cell  displays text into the cell, Image Cell displays images in the cell, Entry Cell allows the user to enter some text,Switch Cell allows the user to select Boolean value that must be on or off.

So we have seen the Pages, Layouts, Controls, and Cells. Go and explore further on the Internet and if you have any query related to the article post your comment below. Until then, happy coding.

Up Next
    Ebook Download
    View all
    Learn
    View all