Xamarin.Forms Guides | Samples

Xamarin.Forms.Frame Class

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

See Also: Frame


public class Frame : ContentView, IElementConfiguration<Frame>


Frame have a default Layout.Padding of 20.

The following example shows how to construct a new Frame with an Outline color.

C# Example

MainPage = new ContentPage () {
    Content = new Frame {
        Content = new Label { Text = "I'm Framous!" },
        OutlineColor = Color.Silver,
        VerticalOptions = LayoutOptions.CenterAndExpand,
        HorizontalOptions = LayoutOptions.Center

XAML for Xamarin.Forms supports the following properties for the Frame class:


true or false, to indicate whether to show a shadow effect where the platform supports it.


A color specification, with or without the prefix, "Color". For example, "Color.Red" and "Red" both specify the color red.


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

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

See Also: ContentView

Public Constructors

Initializes a new instance of the Frame class.

Public Fields

static readonly
HasShadowPropertyBindableProperty. Identifies the HasShadow bindable property.
static readonly
OutlineColorPropertyBindableProperty. Identifies the OutlineColor bindable property.

Public Properties

HasShadowBoolean. Gets or sets a flag indicating if the Frame has a shadow displayed. This is a bindable property.
OutlineColorColor. Gets or sets the color of the border of the Frame. This is a bindable property.

Public Methods