Xamarin.Forms Guides | Samples

Xamarin.Forms.Page Class

A VisualElement that occupies the entire screen.

See Also: Page


public class Page : VisualElement, IElementConfiguration<Page>, ILayout, IPageController


Page is primarily a base class for more useful derived types. Objects that are derived from the Page class are most prominently used as the top level UI element in Xamarin.Forms applications. In addition to their role as the main pages of Xamarin.Forms applications, Page objects and their descendants can be used with navigation classes, such as Navigation or MasterDetailPage, among others, to provide rich user experiences that conform to the expected behaviors on each platform.


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.Page are listed below.

See Also: VisualElement

Public Constructors

Creates a new Page element with default values.

Public Fields

ActionSheetSignalNameString. This method is for internal use.
AlertSignalNameString. This method is for internal use .
static readonly
BackgroundImagePropertyBindableProperty. Identifies the Page.BackgroundImage property.
BusySetSignalNameString. This method is for internal use.
static readonly
IconPropertyBindableProperty. Identifies the Page.Icon property.
static readonly
IsBusyPropertyBindableProperty. Identifies the Page.IsBusy property.
static readonly
PaddingPropertyBindableProperty. Identifies the Page.Padding property.
static readonly
TitlePropertyBindableProperty. Identifies the Page.Title property.

Public Properties

BackgroundImageString. Identifies the image used as a background for the Page.
ContainerAreaRectangle. For internal use by the Xamarin.Forms platform.
IconFileImageSource. Resource identifier for the Page's associated icon.
IgnoresContainerAreaBoolean. For internal use by the Xamarin.Forms platform.
InternalChildrenSystem.Collections.ObjectModel.ObservableCollection<Element>. For internal use by the Xamarin.Forms platform.
IsBusyBoolean. Marks the Page as busy. This will cause the platform specific global activity indicator to show a busy state.
PaddingThickness. The space between the content of the Page and it's border.
TitleString. The Page's title.
ToolbarItemsIList<ToolbarItem>. A set of ToolbarItems, implemented in a platform-specific manner.

Public Methods

DisplayActionSheet(String, String, String, params String[]) : System.Threading.Tasks.Task<string>
Displays a native platform action sheet, allowing the application user to choose from several buttons.
DisplayAlert(String, String, String) : Task
Presents an alert dialog to the application user with a single cancel button.
DisplayAlert(String, String, String, String) : System.Threading.Tasks.Task<bool>
Presents an alert dialog to the application user with an accept and a cancel button.
Forces the Page to perform a layout pass.
On<T>() : IPlatformElementConfiguration<T, Page>
TReturns the platform-specific instance of this Page, on which a platform-specific method may be called.
For internal use by the Xamarin.Forms platform.
SendBackButtonPressed() : Boolean
Calls Page.OnBackButtonPressed.
For internal use by the Xamarin.Forms platform.

Protected Methods

LayoutChildren(Double, Double, Double, Double)
Lays out children Elements into the specified area.
When overridden, allows application developers to customize behavior immediately prior to the Page becoming visible.
OnBackButtonPressed() : Boolean
Application developers can override this method to provide behavior when the back button is pressed.
Invoked whenever the binding context of the Page changes. Override this method to add class handling for this event.
OnChildMeasureInvalidated(Object, EventArgs)
Indicates that the preferred size of a child Element has changed.
When overridden, allows the application developer to customize behavior as the Page disappears.
Called when the Page's Element.Parent property has changed.
OnSizeAllocated(Double, Double)
Indicates that the Page has been assigned a size.
Requests that the children Elements of the Page update their layouts.

Public Events

AppearingIndicates that the Page is about to appear.
DisappearingIndicates that the Page is about to cease displaying.
LayoutChangedRaised when the layout of the Page has changed.