Share via


Xamarin.Forms Namespace

Cross-platform, natively-backed UI toolkit.

Classes

AbsoluteLayout

Positions child elements at absolute positions.

Accelerator

Represents a shortcut key for a MenuItem.

AcceleratorTypeConverter

Class that the XAML parser uses to convert strings to Accelerator objects.

ActivityIndicator

A visual control used to indicate that something is ongoing.

AdaptiveTrigger
Animation

Encapsulates an animation, a collection of functions that modify properties over a user-perceptible time period.

AnimationExtensions

Extension methods for IAnimatable objects.

Application

Class that represents a cross-platform mobile application.

AppLinkEntry

A deep application link in an app link search index.

AppThemeChangedEventArgs
AutomationProperties

Contains both abbreviated and detailed UI information that is supplied to accessibility services.

BackButtonBehavior

A BindableObject specifying the behavior associated with the back button in a Shell application.

BackButtonPressedEventArgs

Internal use only. Contains arguments for the event that is raised when a back button is pressed.

BaseMenuItem

Base class for menu items.

BaseShellItem

A NavigableElement that is the base class for ShellGroupItem and ShellContent.

BaseSwipeEventArgs
Behavior

Base class for generalized user-defined behaviors that can respond to arbitrary conditions and events.

Behavior<T>

Base generic class for generalized user-defined behaviors that can respond to arbitrary conditions and events.

BindableLayout

Static class specifying the attached properties that allow a Layout<T> work with a data-bound System.Collections.IEnumerable.

BindableObject

Provides a mechanism by which application developers can propagate changes that are made to data in one object to another, by enabling validation, type coercion, and an event system. BindableProperty.

BindableObjectExtensions

Contains convenience extension methods for BindableObject.

BindableProperty

A BindableProperty is a backing store for properties allowing bindings on BindableObject.

BindablePropertyConverter

A TypeConverter for bindable properties.

BindablePropertyKey

The secret key to a BindableProperty, used to implement a BindableProperty with restricted write access.

Binding

A single 1:1 immutable data binding.

BindingBase

An abstract class that provides a BindingMode and a formatting option.

BindingCondition

Class that represents a value comparison with the target of an arbitrary binding.

BindingTypeConverter

Type converter that converts from strings to Binding objects.

BoundsConstraint

A bounds layout constraint used by RelativeLayouts.

BoundsTypeConverter

A TypeConverter that converts strings into Rectangles for use with AbsoluteLayouts.

BoxView

A View used to draw a solid colored rectangle.

Brush
BrushTypeConverter
BrushTypeConverter.GradientBrushParser
Button

A button View that reacts to touch events.

Button.ButtonContentLayout

Controls the relative positioning of, and spacing between, text and an image on a Button.

Button.ButtonContentTypeConverter

Class that the XAML parser uses to convert strings to Button.ButtonContentLayout objects.

CarouselLayoutTypeConverter
CarouselPage

A Page that users can swipe from side to side to display pages of content, like a gallery.

CarouselView

A ItemsView whose scrollable child views 'snap' into place.

Cell

Provides base class and capabilities for all Xamarin.Forms cells. Cells are elements meant to be added to ListView or TableView.

CheckBox
CheckedChangedEventArgs

Event Args for CheckBox's CheckedChanged event.

ChildGestureRecognizer

A gesture recognizer for use as a child of another.

ClickedEventArgs

Event arguments for a click event.

ClickGestureRecognizer

Recognizer for click gestures.

CollectionView

A SelectableItemsView that presents a collection of items.

ColorTypeConverter

A TypeConverter that converts from strings to a Color.

ColumnDefinition

An IDefinition that defines properties for a column in a Grid.

ColumnDefinitionCollection

A DefinitionCollection<T> for ColumnDefinitions.

ColumnDefinitionCollectionTypeConverter
Command

Defines an System.Windows.Input.ICommand implementation that wraps a System.Action.

Command<T>

Defines an System.Windows.Input.ICommand implementation wrapping a generic Action<T>.

CompareStateTrigger
CompressedLayout

Contains attached properties for omitting redundant renderers.

Condition

Base class for conditions.

Configuration<TPlatform,TElement>

Utility class for retrieving platform-specific versions of elements.

Constraint

A layout constraint used by RelativeLayouts.

ConstraintExpression

Defines a constraint relationship.

ConstraintTypeConverter

A TypeConverter that converts from strings to a Constraint.

ContentPage

A Page that displays a single view.

ContentPresenter

Layout manager for templated views.

ContentPropertyAttribute

Indicates the property of the type that is the (default) content property.

ContentView

An element that contains a single child element.

ControlTemplate

Template that specifies a group of styles and effects for controls.

CornerRadiusTypeConverter

A TypeConverter subclass that can convert a string to a CornerRadius.

CurrentItemChangedEventArgs
DataPackage
DataPackagePropertySet
DataPackagePropertySetView
DataPackageView
DataTemplate

A template for multiple bindings, commonly used by ListViews and MultiPage<T>s.

DataTemplateSelector

Selects DataTemplate objects by data type and container.

DataTrigger

Class that represents a condition on an arbitrary binding, along with a list of Setter objects that will be applied when the condition is met.

DateChangedEventArgs

Event arguments for DateSelected event.

DatePicker

A View that allows date picking.

DefinitionCollection<T>

A collection parameterized by an IDefinition. Base class for ColumnDefinitionCollection and RowDefinitionCollection.

DependencyAttribute

An attribute that indicates that the specified type provides a concrete implementation of a needed interface.

DependencyService

Static class that provides the Get<T>(DependencyFetchTarget) factory method for retrieving platform-specific implementations of the specified type T.

DesignMode

Static class that developers can use to determine if the application is running in a previewer.

Device

A utility class to interact with the current Device/Platform.

Device.Styles

Class that exposes device-specific styles as static fields.

DeviceStateTrigger
DoubleCollection
DoubleCollectionConverter
DragEventArgs
DragGestureRecognizer
DragStartingEventArgs
DropCompletedEventArgs
DropEventArgs
DropGestureRecognizer
Easing

Functions that modify values non-linearly, generally used for animations.

EasingTypeConverter
Editor

A control that can edit multiple lines of text.

Effect

A collection of styles and properties that can be added to an element at run time.

EffectiveFlowDirectionExtensions

Extension methods for finding out the flow direction and whether it was explicitly set.

EffectiveVisualExtensions
Element

Provides the base class for all Xamarin.Forms hierarchal elements. This class contains all the methods and properties required to represent an element in the Xamarin.Forms hierarchy.

ElementEventArgs

Provides data for events pertaining to a single Element.

ElementTemplate

Base class for DataTemplate and ControlTemplate classes.

EmbeddedFont
Entry

A control that can edit a single line of text.

EntryCell

A Cell with a label and a single line text entry field.

EventTrigger

Class that represents a triggering event and a list of TriggerAction objects that will be invoked when the event is raised.

ExportEffectAttribute

Attribute that identifies a Effect with a unique identifier that can be used with Resolve(String) to locate an effect.

ExportFontAttribute
FileImageSource

An ImageSource that reads an image from a file.

FileImageSourceConverter

A TypeConverter that converts to FileImageSource.

FlexAlignContentTypeConverter

Converts a string representation of a child content row alignment style to a FlexAlignContent.

FlexAlignItemsTypeConverter

Converts a string representation of a child content alignment style to a FlexAlignItems.

FlexAlignSelfTypeConverter

Converts a string representation of an alignment override to a FlexAlignSelf.

FlexBasis.FlexBasisTypeConverter

Converts a string representation of a flex basis to a FlexBasis.

FlexDirectionTypeConverter

Converts a string representation of a row or column flex layout direction to a FlexDirection.

FlexJustifyTypeConverter

Converts a string representation of a child element justification style to a FlexJustify.

FlexLayout

A Flexbox-like layout that lays out child elements in optionally wrappable rows or columns of child elements.

FlexWrapTypeConverter

Converts a string representation of a wrapping style to a FlexWrap.

FlowDirectionConverter

Converts a string representation of a flow direction to a FlowDirection.

FlyoutItem

A ShellItem that has a collection of Tab objects.

FlyoutPage
FocusEventArgs

Event args for VisualElement's Focused and Unfocused events.

FontAttributesConverter

Converts a string into a FontAttributes object.

FontFile
FontImageSource
FontSizeConverter

Converts a string into a font size.

FontTypeConverter

A TypeConverter that converts from strings to Font.

FormattedString

Represents a text with attributes applied to some parts.

Frame

An element containing a single child, with some framing options.

GestureElement

An element that can respond to gestures.

GestureRecognizer

The base class for all gesture recognizers.

GradientBrush
GradientStop
GradientStopCollection
Grid

A layout that arranges views in rows and columns.

GridItemsLayout
GridLengthTypeConverter

A TypeConverter that converts from strings to GridLengths.

GroupableItemsView
HandlerAttribute

An abstract attribute whose subclasses specify the platform-specific renderers for Xamarin.Forms abstract controls.

HtmlWebViewSource

A WebViewSource bound to an HTML-formatted string.

Image

View that holds an image.

ImageButton
ImageCell

A TextCell that has an image.

ImageSource

Abstract class whose implementors load images from files or the Web.

ImageSourceConverter

Class that takes a string representation of an image file location and returns a ImageSource from the specified resource.

IndicatorView
InputView

The base class of a view which can take keyboard input.

InvalidNavigationException
ItemsLayout
ItemsLayoutTypeConverter
ItemsView

A View that serves as a base class for views that contain a templated list of items.

ItemsView<TVisual>

A base class for a view that contains a templated list of items.

ItemsViewScrolledEventArgs
ItemTappedEventArgs

Event arguments for the ItemTapped event.

ItemVisibilityEventArgs

Event args when an item's visibility has been changed in a ListView.

Keyboard

Default keyboard and base class for specialized keyboards, such as those for telephone numbers, email, and URLs.

KeyboardTypeConverter

A TypeConverter that converts a string into a Keyboard.

Label

A View that displays text.

Layout

Provides the base class for all Layout elements. Use Layout elements to position and size child elements in Xamarin.Forms applications.

Layout<T>

A base implementation of a layout with undefined behavior and multiple children.

LayoutOptionsConverter

Class that takes a string representation of a LayoutOptions and returns a corresponding LayoutOptions.

LinearGradientBrush
LinearItemsLayout
ListProxyChangedEventArgs
ListStringTypeConverter

Type converter for converting properly formatted string lists to lists.

ListView

An ItemsView<TVisual> that displays a collection of data as a vertical list.

MarshalingObservableCollection
MasterDetailPage

A Page that manages two panes of information: A master page that presents data at a high level, and a detail page that displays low-level details about information in the master.

Menu

Represents an application menu on platforms that support them.

MenuItem

Class that presents a menu item and associates it with a command.

MenuItemCollection

A group of related MenuItem objects.

MessagingCenter

Associates a callback on subscribers with a specific message name.

ModalEventArgs

Base class for ModalPushedEventArgs, ModalPushingEventArgs, ModalPoppedEventArgs, and ModalPoppingEventArgs.

ModalPoppedEventArgs

Arguments for the event that is raised when a modal window is popped from the navigation stack.

ModalPoppingEventArgs

Arguments for the event that is raised when a modal window is popping from the navigation stack.

ModalPushedEventArgs

Arguments for the event that is raised when a modal window is pushed onto the navigation stack.

ModalPushingEventArgs

Arguments for the event that is raised when a modal window is being pushed onto the navigation stack.

MultiBinding
MultiPage<T>

A bindable, templatable base class for pages which contain multiple sub-pages.

MultiTrigger

Class that represents a list of property and binding conditions, and a list of setters that are applied when all of the conditions in the list are met.

NamedPlatformColor
NameScopeExtensions

Extension methods for Element that adds a strongly-typed FindByName method.

NavigableElement

A Element that supports navigation.

NavigationEventArgs

EventArgs for the NavigationPage's navigation events.

NavigationPage

A Page that manages the navigation and user-experience of a stack of other pages.

On

Class that is used within OnPlatform tags in XAML when specifying values on platforms.

OnIdiom<T>

Provides idiom-specific value for T for the current target idiom.

OnPlatform<T>

Provides the platform-specific implementation of T for the current OS.

OpenGLView

A View that displays OpenGL content.

OpenSwipeEventArgs
OrientationStateTrigger
Page

A VisualElement that occupies the entire screen.

PanGestureRecognizer

A gesture recognizer for panning content that is larger than its parent view.

PanUpdatedEventArgs

Event that is raised when a pan gesture updates.

Picker

A View control for picking an element in a list.

PinchGestureRecognizer

Recognizer for pinch gestures.

PinchGestureUpdatedEventArgs

Event arguments for the PinchUpdated event.

PlatformEffect<TContainer,TControl>

Base class for platform-specific effect classes.

PointTypeConverter

A TypeConverter that converts from a string to a Point.

PoppedToRootEventArgs

EventArgs for the NavigationPage's PoppedToRoot navigation event.

PositionChangedEventArgs
ProgressBar

A View control that displays progress.

PropertyChangingEventArgs

Event arguments for the PropertyChangingEventHandler delegate.

PropertyCondition

Class that represents a value comparison against a property on the control that contains the enclosing MultiTrigger.

QueryPropertyAttribute
RadialGradientBrush
RadioButton
RadioButtonGroup
RectangleTypeConverter

A TypeConverter that converts a string to a Rectangle.

RectTypeConverter
ReferenceTypeConverter

For internal use by the Xamarin.Forms platform.

RefreshView
RelativeBindingSource
RelativeLayout

A Layout<T> that uses Constraints to layout its children.

RenderWithAttribute

Associate view with renderer.

ResolutionGroupNameAttribute

Attribute that identifies a group name, typically a company name or reversed company URL, that provides a scope for effect names.

ResourceDictionary

An IDictionary that maps identifier strings to arbitrary resource objects.

ResourceDictionary.RDSourceTypeConverter

For internal use by the Xamarin.Forms platform.

RouteFactory
Routing
RoutingEffect

Platform-independent effect that wraps an inner effect, which is usually platform-specific.

RowDefinition

An IDefinition that defines properties for a row in a Grid.

RowDefinitionCollection

A DefinitionCollection<T> for RowDefinitions.

RowDefinitionCollectionTypeConverter
ScrolledEventArgs

Arguments for the event that is raised when a window is scrolled.

ScrollToRequestedEventArgs

Arguments for the event that is raised when a scroll is requested.

ScrollToRequestEventArgs
ScrollView

An element capable of scrolling if its Content requires.

SearchBar

A View control that provides a search box.

SearchHandler

Default implementation of ISearchHandlerController.

SelectableItemsView
SelectedItemChangedEventArgs

Event arguments for the ItemSelected event.

SelectedPositionChangedEventArgs

Event arguments for positional scrolling events.

SelectionChangedEventArgs
Setter

Represents an assignment of a property to a value, typically in a style or in response to a trigger.

SettersExtensions

Defines extensions methods for IList<Setter>

Shell

A Page that provides fundamental UI features that most applications require, leaving you to focus on the application's core workload.

ShellAppearance
ShellContent

Corresponds to a ContentPage contained in a ShellSection.

ShellGroupItem

A BaseShellItem that has FlyoutDisplayOptions. Base class for ShellItem and ShellSection.

ShellItem

One or more items in the flyout. Contained within a Shell.

ShellNavigatedEventArgs

Arguments for the OnNavigated(ShellNavigatedEventArgs) event.

ShellNavigatingDeferral
ShellNavigatingEventArgs

Arguments for the OnNavigating(ShellNavigatingEventArgs) event.

ShellNavigationState

A URI representing either the current page or a destination for navigation in a Shell application.

ShellSection

Grouped content in a Shell application, navigable by bottom tabs.

SizeTypeConverter

A TypeConverter that can convert a string into a Size object.

Slider

A View control that inputs a linear value.

SolidColorBrush
Span

Represents a section of a FormattedString.

StackLayout

A Layout<T> that positions child elements in a single line which can be oriented vertically or horizontally.

StateTrigger
StateTriggerBase
Stepper

A View control that inputs a discrete value, constrained to a range.

StreamImageSource

ImageSource that loads an image from a System.IO.Stream.

StructuredItemsView
Style

Class that contains triggers, setters, and behaviors that completely or partially define the appearance and behavior of a class of visual elements.

SwipeChangingEventArgs
SwipedEventArgs

Arguments for swipe events.

SwipeEndedEventArgs
SwipeGestureRecognizer

Recognizer for swipe gestures.

SwipeItem
SwipeItems
SwipeItemView
SwipeStartedEventArgs
SwipeView
Switch

A View control that provides a toggled value.

SwitchCell

A Cell with a label and an on/off switch.

Tab
TabBar
TabbedPage

MultiPage<T> that displays an array of tabs across the top of the screen, each of which loads content onto the screen.

TabIndexExtensions

Extensions methods supporting iteration and retrieval of tab indexes.

TableRoot

A TableSection that contains either a table section or the entire table.

TableSection

A logical and visible section of a TableView.

TableSectionBase

Abstract base class defining a table section.

TableSectionBase<T>

Table section that contains instances of type T that are rendered by Xamarin.Forms.

TableView

A View that holds rows of Cell elements.

TapGestureRecognizer

Provides tap gesture recognition and events.

TappedEventArgs

Arguments for the ItemTapped event.

TemplateBinding

Binds a template property to the parent of the view that owns a ControlTemplate.

TemplatedPage

A page that displays full-screen content with a control template, and the base class for ContentPage .

TemplatedView

A view that displays content with a control template, and the base class for ContentView.

TemplateExtensions

Extension class for DataTemplate, providing a string-based shortcut method for defining a Binding.

TextAlignmentConverter

Converts a string representation of a text alignment to a TextAlignment.

TextCell

A Cell with primary Text and Detail text.

TextChangedEventArgs

Event arguments for TextChanged events. Provides old and new text values.

TextDecorationConverter

A TypeConverter subclass that can convert between a string and a TextDecorations object.

ThicknessTypeConverter

A TypeConverter that converts from a string to a Thickness.

TimePicker

A View control that provides time picking.

ToggledEventArgs

Event arguments for Toggled and OnChanged events.

ToolbarItem

An item in a toolbar or displayed on a Page.

Trigger

Class that represents a property condition and an action that is performed when the condition is met.

TriggerAction

A base class for user-defined actions that are performed when a trigger condition is met.

TriggerAction<T>

A generic base class for user-defined actions that are performed when a trigger condition is met.

TriggerBase

Base class for classes that contain a condition and a list of actions to perform when the condition is met.

TypeConverter

Abstract base class whose subclasses can convert values between different types.

TypeConverterAttribute

Attribute that specifies the type of TypeConverter used by its target.

TypeTypeConverter

Class that takes a string representation of a System.Type and returns a corresponding System.Type.

UnsolvableConstraintsException

Exception indicating that the Constraints specified cannot be simultaneously satisfied.

UriImageSource

An ImageSource that loads an image from a URI, caching the result.

UriTypeConverter

A TypeConverter that converts from a string or System.Uri to a System.Uri.

UrlWebViewSource

A WebViewSource bound to a URL.

ValueChangedEventArgs

Event arguments for ValueChanged events. Provides both old and new values.

View

A visual element that is used to place layouts and controls on the screen.

ViewCell

A Cell containing a developer-defined View.

ViewExtensions

Extension methods for Views, providing animatable scaling, rotation, and layout functions.

VisualAttribute
VisualElement

A Element that occupies an area on the screen, has a visual appearance, and can obtain touch input.

VisualElement.FocusRequestArgs

Contains event arguments for the FocusChangeRequested event.

VisualElement.VisibilityConverter

Converts a string representation of a visual element visibility to a Boolean that represents the visibility of the element.

VisualMarker

Contains the IVisual types implemented by the Xamarin Forms team and the default IVisual types used by the Visual system.

VisualMarker.DefaultVisual

IVisual marker type used to indicate for a View to render using a default renderer.

VisualMarker.MaterialVisual

IVisual marker type used to indicate for a View to render using a material renderer.

VisualState

Contains a named visual state that applies a list of setters to an element in order to correlate a state with an appearance.

VisualStateGroup

Contains a list of related visual states that can be applied to a visual element.

VisualStateGroupList

Contains a list of visual state groups for an application.

VisualStateManager

Manages visual state groups and transitions controls between states.

VisualStateManager.CommonStates
VisualTypeConverter

A TypeConverter that can convert a string into a IVisual object.

WeakEventManager
WebNavigatedEventArgs

Class that contains arguments for the event that is raised after web navigation completes.

WebNavigatingEventArgs

Class that contains arguments for the event that is raised after web navigation begins.

WebNavigationEventArgs

TClass that contains arguments for the event that is when web navigation begins.

WebView

A View that presents HTML content.

WebViewSource

Abstract class whose subclasses provide the data for a WebView.

WebViewSourceTypeConverter

A TypeConverter that converts a string to a UrlWebViewSource.

XmlnsDefinitionAttribute

Attribute specifying the mapping between an XML namespace and a CLR namespace.

XmlnsPrefixAttribute

Structs

Color

Class that represents a color and exposes it as RGBA and HSL values.

CornerRadius

Contains methods and properties for specifying corner radiuses.

FlexBasis

Struct that represents an absolute or relative element size.

Font

The font used to display text.

GridLength

Used to define the size (width/height) of Grid ColumnDefinition and RowDefinition.

LayoutOptions

A struct whose static members define various alignment and expansion options.

Point

Struct defining a 2-D point as a pair of doubles.

Rect
Rectangle

Struct defining a rectangle, using doubles.

Region

Represents a visual region in a Xamarin.Forms UI.

Size

Struct defining height and width as a pair of doubles.

SizeRequest

Struct that defines minimum and maximum Sizes.

Thickness

Struct defining thickness around the edges of a Rectangle using doubles.

Vec2

Struct defining X and Y double values.

Interfaces

AbsoluteLayout.IAbsoluteList<T>

List interface with overloads for adding elements to an absolute layout.

Grid.IGridList<T>

List interface with overloads for adding elements to a grid.

IAnimatable

Defines an interface for elements that can be animated.

IAppearanceObserver
IAppIndexingProvider

This interface is for internal use by platform renderers.

IApplicationController

For internal use by platform renderers.

IAppLinkEntry

Interface that represents a deep application link in an app link search index.

IAppLinks

Interface that defines the methods that are required for registering and deregistering links to content in apps.

IBorderElement
IButtonController

For internal use by platform renderers.

ICellController

For internal use by platform renderers.

IConfigElement<T>

This interface is for internal use by platform renderers.

IConfigPlatform

Base interface for marker classes that identify target platforms for platform specific effects.

IDecorableTextElement

Interface for classes supporting TextDecorations.

IDefinition

Interface defining the type of RowDefinition and ColumnDefinition.

IDispatcher
IDispatcherProvider
IEditorController

For internal use by platform renderers.

IEffectControlProvider

When implemented in a renderer, registers a platform-specific effect on an element.

IElementConfiguration<TElement>

Interface for returning the platform-specific instance of a Xamarin.Forms type.

IElementController

For internal use by platform renderers.

IEmbeddedFontLoader
IEntryCellController

For internal use by platform renderers.

IEntryController

For internal use by platform renderers.

IExtendedTypeConverter

Base class for type converters.

IFlyoutBehaviorObserver
IFlyoutPageController
IGestureRecognizer

The base interface all gesture recognizers must implement.

IGestureRecognizers
IGridController

For internal use by platform renderers.

IImageController

For internal use by platform renderers.

IImageElement
IItemsLayout
IItemsView<T>

This interface is for internal use by platform renderers.

IItemViewController

For internal use by platform renderers.

ILayout

Interface indicating layout behavior and exposing the LayoutChanged event.

ILayoutController

For internal use by platform renderers.

IListProxy

This interface is for internal use by platform renderers.

IListViewController

For internal use by platform renderers.

IMasterDetailPageController

For internal use by platform renderers.

IMenuItemController

For internal use by platform renderers.

IMessagingCenter

Enables view models and other components to communicate by adhering to a message contract.

IMultiPageController<T>

Base class for multipage controllers.

IMultiValueConverter
INativeElementView

Interface that contains a read-only property that returns the platform-specific native view for a Xamarin.Forms element.

INavigation

Interface abstracting platform-specific navigation.

INavigationPageController

For internal use by platform renderers.

IOpenGlViewController

For internal use by platform renderers.

IPageContainer<T>

Interface defining a container for Pages and exposing a CurrentPage property.

IPageController

For internal use by platform renderers.

IPanGestureController

For internal use by platform renderers.

IPinchGestureController

For internal use by platform renderers.

IPlatformElementConfiguration<TPlatform,TElement>

Marker interface for returning platform-specific configuration elements.

IQueryAttributable
IRegisterable

Internally-used flagging interface indicating types that can be registered with the internal Registrar.

IScrollViewController

For internal use by platform renderers.

ISearchBarController

For internal use by platform renderers.

ISearchHandlerController

Defines the interface for controlling the behavior of the search handler.

IShellAppearanceElement

Interface defining colors for the tab bar in Shell applications.

IShellContentController

Extends IElementController to define methods appropriate to a content page in Shell applications.

IShellContentInsetObserver

Defines an interface for observing changes to inset dimensions.

IShellController

Extends IPageController for Shell applications.

IShellItemController

Extends IElementController to work with the parts of a Shell application.

IShellSectionController

Extends IElementController with methods specific to Shell applications.

ISliderController
IStreamImageSource

This interface is for internal use by platform renderers.

ISwipeGestureController

For internal use by platform renderers.

ISwipeItem
ISwipeViewController
ITableModel

This interface is for internal use by platform renderers.

ITableViewController

For internal use by platform renderers.

ITabStopElement
ITemplatedItemsList<TItem>

This interface is for internal use by platform renderers.

ITemplatedItemsListScrollToRequestedEventArgs

This interface is for internal use by platform renderers.

ITemplatedItemsView<TItem>

This interface is for internal use by platform renderers.

IValueConverter

Interface defining methods for two-way value conversion between types.

IViewContainer<T>

The type of element that can be added to the container.

IViewController

This interface is for internal use by platform renderers.

IVisual
IVisualElementController

For internal use by platform renderers.

IWebViewController

For internal use by platform renderers.

IWebViewDelegate

This interface is for internal use by platform renderers.

RelativeLayout.IRelativeList<T>

An System.Collections.Generic.IList`1 of Views used by a RelativeLayout.

Enums

AbsoluteLayoutFlags

Flags used to modify how layout bounds are interpreted in an AbsoluteLayout.

AccessKeyPlacement

Enumerates access key placement relative to the control that the access key describes.

Aspect

Defines how an image is displayed.

BindingMode

The direction of changes propagation for bindings.

Button.ButtonContentLayout.ImagePosition

Enumerates image locations within a button.

ButtonsMask

Flag values that represent mouse buttons.

ClearButtonVisibility
ConstraintType

Enumeration specifying whether a constraint is constant, relative to a view, or relative to its parent.

DataPackageOperation
DependencyFetchTarget

Enumeration specifying whether Get<T>(DependencyFetchTarget) should return a reference to a global or new instance.

EditorAutoSizeOption

Enumerates values that control whether an editor will change size to accommodate input as the user enters it.

EffectiveFlowDirection

Enumerates flags that indicate whether the layout direction was explicitly set, and whether the layout direction is right-to-left.

FlexAlignContent

Enumerates values that control how multiple rows or columns of child elements are aligned.

FlexAlignItems

Enumerates values that control the alignment of child elements.

FlexAlignSelf

Enumerates values that control how and whether a child element overrides alignment attributes applied by its parent.

FlexDirection

Enumerates values that specify row and columen flex layout directions, relative to the directions for the device locale.

FlexJustify

Enumerates values that describe how child elements are justified when there is extra space around them.

FlexPosition

Enumerates values that control how layout coordinates are interpreted when specifying the positions of child elements.

FlexWrap

Enumerates values that control whether and how to wrap items in a FlexLayout.

FlowDirection

Enumerates values that control the layout direction for views.

FlyoutBehavior

Enumeration of modes for the root menu of a Shell application.

FlyoutDisplayOptions

Enumerates display modes for the flyout in a Shell appication.

FlyoutHeaderBehavior

Enumeration of modes followed by the FlyoutHeader.

FlyoutLayoutBehavior
FontAttributes

Enumerates values that describe font styles.

GestureState

Enumeration specifying the various states of a gesture.

GestureStatus

Enumerates possible gesture states.

GridUnitType

Enumerates values that control how the Value property is interpreted for row and column definitions.

IndicatorShape
InitializationFlags
ItemSizingStrategy
ItemsLayoutOrientation
ItemsUpdatingScrollMode
KeyboardFlags

Enumerates keyboard option flags that controls capitalization, spellcheck, and suggestion behavior.

LayoutAlignment

Values that represent LayoutAlignment.

LineBreakMode

Enumeration specifying various options for line breaking.

ListViewCachingStrategy

Enumerates caching strategies for a ListView.

ListViewSelectionMode

Enumerates values that control whether items in a list view can or cannot be selected.

MasterBehavior

Enumerates values that control how detail content is displayed in a master-detail page.

MeasureFlags

Enumerates values that tell whether margins are included when laying out windows.

NamedSize

Represents pre-defined font sizes.

OpenSwipeItem
OSAppTheme
PresentationMode
RelativeBindingSourceMode
ReturnType

Enumerates return button styles.

ScrollBarVisibility

Enumerates conditions under which scroll bars will be visible.

ScrollMode
ScrollOrientation

Enumeration specifying vertical or horizontal scrolling directions.

ScrollToMode

Enumerates values that describe how a scroll request is made.

ScrollToPosition

Enumerates values that describe a scroll request.

SearchBoxVisibility
SelectionMode
SeparatorVisibility

Enumerates values that control the visibility of list item separators.

ShellNavigationSource

Enumerates reasons for a navigation event in Shell applications.

SnapPointsAlignment
SnapPointsType
StackOrientation

The orientations the a StackLayout can have.

Stretch
SweepDirection
SwipeBehaviorOnInvoked
SwipeDirection

Enumerates swipe directions.

SwipeMode
TableIntent

TableIntent provides hints to the renderer about how a table will be used.

TabsStyle

Enumerates tab styles for tabbed pages.

TargetIdiom

Indicates the type of device Xamarin.Forms is working on.

TargetPlatform

Indicates the kind of OS Xamarin.Forms is currently working on.

TextAlignment

Enumerates values that control text alignment.

TextDecorations

Flagging enumeration defining text decorations.

TextTransform
TextType
ToolbarItemOrder

Enumeration specifying whether the ToolbarItem appears on the primary toolbar surface or secondary.

ViewState

Deprecated. Do not use.

WebNavigationEvent

Contains values that indicate why a navigation event was raised.

WebNavigationResult

Enumerates values that indicate the outcome of a web navigation.

Delegates

BindableProperty.BindingPropertyChangedDelegate

Delegate for BindableProperty.PropertyChanged.

BindableProperty.BindingPropertyChangedDelegate<TPropertyType>

Strongly-typed delegate for BindableProperty.PropertyChanged.

BindableProperty.BindingPropertyChangingDelegate

Delegate for BindableProperty.PropertyChanging.

BindableProperty.BindingPropertyChangingDelegate<TPropertyType>

Strongly-typed delegate for BindableProperty.PropertyChanging.

BindableProperty.CoerceValueDelegate

Delegate for BindableProperty.CoerceValue.

BindableProperty.CoerceValueDelegate<TPropertyType>

Strongly-typed delegate for BindableProperty.CoerceValue.

BindableProperty.CreateDefaultValueDelegate

Strongly typed delegate for BindableProperty.DefaultValueCreator.

BindableProperty.CreateDefaultValueDelegate<TDeclarer,TPropertyType>

Delegate for BindableProperty.DefaultValueCreator.

BindableProperty.ValidateValueDelegate

Delegate for BindableProperty.ValidateValue.

BindableProperty.ValidateValueDelegate<TPropertyType>

Strongly-typed delegate for BindableProperty.ValidateValue.

CollectionSynchronizationCallback

Delegate for callback in EnableCollectionSynchronization(IEnumerable, Object, CollectionSynchronizationCallback).

PropertyChangingEventHandler

Delegate for the PropertyChanging event.

Remarks

Xamarin.Forms is a cross-platform, natively-backed UI toolkit abstraction that allows developers to create user interfaces that can be shared across Android, iOS, and Windows Phone. Because the user interfaces use the native controls of the target platforms, they have the appearance and, importantly, the responsiveness of natively built apps.

Xamarin.Forms Solution Architecture

Cross-Platform Project

The user-experience of a Xamarin.Forms application is usually defined in a cross-platform shared project (either a Portable Class Library or a Shared Project) and combined with platform-specific projects that, at the least, initialize the native platform rendering (note the call to Forms.Init() in the platform code samples below) and, more generally, extend the user-experience and user-interface in platform-specific manners (for instance, by accessing platform-specific sensors or capabilities).

For example, the developer can create a cross-platform Xamarin.Forms Label and display it with the following code in the shared project:

public class App : Xamarin.Forms.Application
{
    public App ()
    {
        MainPage = new ContentPage
        {
            Content = new Label
                {
                    Text = "Welcome to Xamarin Forms!",
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                },
        };
    }
}

This code results in a centered label on the target platforms:

While more complicated layouts with more useful user interfaces are more typical, this example is useful for clearly illustrating the shared and platform-specific code that Xamarin.Forms uses to create and display the code on the target platforms. The code in the following discussion is created by Visual Studio in the target platform projects when the developer creates a new Xamarin.Forms project. In each case, a platform-specific Forms.Init() method is called to intitialize forms before any other method that depends on Xamarin.Forms is called.

iOS Platform Code

On the iOS platform, Visual Studio registers a subclass of the framework class Xamarin.Forms.Platform.iOS.FormsApplicationDelegate as the entry point of the application, and immediately makes a call to Xamarin.Forms.Forms.Init.

[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        global::Xamarin.Forms.Forms.Init();
        LoadApplication(new App());

        return base.FinishedLaunching(app, options);
    }
}

Android Platform Code

The entry point on Android is a subclass of the framework class Xamarin.Forms.Platform.Android.FormsAppCompatActivity, and its OnCreate method must configure the tab bar and toolbars and call its base method before calling Forms.Init.

[Activity(Label = "HelloXamarinFormsWorld.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
    protected override void OnCreate(Bundle bundle)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;

        base.OnCreate(bundle);

        global::Xamarin.Forms.Forms.Init(this, bundle);

        LoadApplication(new App());
    }

    protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
    {
        base.OnActivityResult(requestCode, resultCode, data);
    }
}

UWP Code

The entry point for a Xamarin.Forms app on UWP is just the constructor for a Windows.UI.Xaml.Application in App.xaml.cs in the UWP platform project. However, the application lifecycle on UWP is such that the call to Forms.Init must take place inside the OnLaunched method, and is guarded against being run more than once. The necessary code is beyond the scope of this documentation, but the curious developer is encouraged to create a test Xamarin.Forms solution and study the code in the App.xaml.cs file for more details

Elements in Xamarin.Forms

Important types in the Xamarin.Forms namespace include Page, View, and Layout. Pages typically correspond with controller objects (Activities in the Android world, UIViewControllers in the iOS world), Views with controls or widgets, and Layouts arrange Views on other Views. These types are all derived from Element.

Model-View-ViewModel and Xamarin.Forms

Application developers use the Model-View-ViewModel (MVVM) pattern to create Xamarin.Forms apps that cleanly separate the concerns of data presentation and user interface from the concerns of data storage and manipulation. The Xamarin.Forms framework enables this by providing, among a few other related types, the BindableObject and BindableProperty classes. Objects that inherit from BindableObject can be bound to members of type BindableProperty on other objects.

A BindableObject maintains dictionary of BindableProperty names and an association with their corresponding binding contexts--simply the object on which the BindableProperty is defined and that the application developer has assigned to the BindingContext property--through a Binding. See BindableObject for more information.

See also