Bendrinti naudojant


Controls Reference

The user interface of a Xamarin.Forms application is constructed of objects that map to the native controls of each target platform. This allows platform-specific applications for iOS, Android, and the Universal Windows Platform to use Xamarin.Forms code contained in a .NET Standard library.

The four main control groups used to create the user interface of a Xamarin.Forms application are as follows:

A Xamarin.Forms page generally occupies the entire screen. The page usually contains a layout, which contains views and possibly other layouts. Cells are specialized components used in connection with TableView and ListView. A class diagram that shows the hierarchy of types that are typically used to build a user interface in Xamarin.Forms can be found at Xamarin.Forms Controls Class Hierarchy.

In the four articles on Pages, Layouts, Views, and Cells, each type of control is described with links to its API documentation, an article describing its use (if one exists), and one or more sample programs (if they exist). Each type of control is also accompanied by a screenshot showing a page from the sample running on iOS and Android devices. Below each screenshot are links to the source code for the C# page, the equivalent XAML page, and (when appropriate) the C# code-behind file for the XAML page.

Note

Pages, Layouts, and Views derive from the VisualElement class. The VisualElement class provides a variety of properties, methods, and events that are useful in deriving classes. For more information, see VisualElement properties, methods, and events.

In addition to the controls supplied with Xamarin.Forms, third-party controls are available. For more information, see Third Party Controls.