Xamarin.Forms Views

PDF for offline use
Related Articles:
Related Samples:
Related APIs:

Let us know how you feel about this


0/250

Xamarin.Forms views are the building blocks of cross-platform mobile user interfaces.

Views

Xamarin.Forms uses the word View to refer to visual objects such as buttons, labels or text entry boxes - which may be more commonly known as controls of widgets.

These UI elements are typically are subclasses of View.


Xamarin.Forms supports:

Type Description Screenshot
ActivityIndicator A visual control used to indicate that something is ongoing. This control gives a visual clue to the user that something is happening, without information about its progress.
BoxView A View used to draw a solid colored rectangle. BoxView is a useful stand-in for images or custom elements when doing initial prototyping. BoxView has a default size request of 40x40. If you need a different size, assign the VisualElement.WidthRequest and the VisualElement.HeightRequest.
Button A button View that reacts to touch events.
DatePicker A View that allows date picking. The visual representation of a DatePicker is very similar to the one of Entry, except that a special control for picking a date appears in place of a keyboard
Editor A control that can edit multiple lines of text. For single line entries, see Entry.
Entry A control that can edit a single line of text. Entry is a single line text entry. It is best used for collecting small discrete pieces of information, like usernames and passwords.
Image A View that holds an image.
Image API
Working with Images
Demo source
Label A View that displays text in a read only format. A Label is used to display single-line text elements as well as multi-lines blocks of text.
ListView An ItemView that displays a collection of data as a vertical list.
ListView API
ListView documentation
OpenGLView A View that displays OpenGL content.
  • Only works for iOS and Android projects (no Windows Phone support).
  • Requires a reference to the OpenTK-1.0 assembly in the iOS and Android projects.
  • Best suited to use in Shared Projects; if used in a PCL then a DependencyService will also be required.
Picker A View control for picking an element in a list. The visual representation of a Picker is similar to a Entry, but a picker control appears in place of a keyboard.
ProgressBar A View control indicating a progress.
SearchBar A View control that provides a search box.
Slider A View control that inputs a linear value.
Stepper A View control that inputs a discrete value, constrained to a range.
Switch A View control that provides a toggled value.
TableView A View that holds rows of Cells.
TableView API
TableView documentation
Demo source
TimePicker A View control that provides time picking. The visual representation of a TimePicker is very similar to the one of Entry, except that a special control for picking a time appears in place of a keyboard.
WebView A View that presents HTML content.
WebView API
WebView documentation
Demo source

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.