Xamarin.Forms Xamarin Forms Layouts Frame


Example

An element containing a single child, with some framing options. Frame have a default Xamarin.Forms.Layout.Padding of 20.

Frame Layout (image by Xamarin)

XAML

<Frame>
<Label Text="I've been framed!"
HorizontalOptions="Center"
VerticalOptions="Center" />
</Frame>

Code

var frameView = new Frame {
Content = new Label {
 Text = "I've been framed!",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
},
OutlineColor = Color.Red
};