Споделяне чрез

Xamarin.Forms StackLayout Tutorial

Before attempting this tutorial, you should have successfully completed the:

In this tutorial, you learn how to:

  • Create a Xamarin.Forms StackLayout in XAML.
  • Specify the orientation of the StackLayout.
  • Control child view alignment and expansion within the StackLayout.

You will use Visual Studio 2019, or Visual Studio for Mac, to create a simple application that demonstrates how to align controls within a StackLayout. The following screenshots show the final application:

Screenshot of child views in a StackLayout, with alignment and expansion options set, on iOS and Android

You'll also use XAML Hot Reload for Xamarin.Forms to see UI changes without rebuilding your application.