Xamarin.Froms  StackLayout Orientation,Children,Padding,Spacing

StackLayout レイアウト についてメモしておきます。

Vertical:縦向き

 

var Label = new Label

{
      Text = "Welcome to Orientation"
};

Content = new StackLayout
{

     Spacing = 20,
     Padding = new Thickness(10),
     Orientation = StackOrientation.Vertical,
     Children = { Label }
};

Horizontal:横向き

 

var Label = new Label
{
      Text = "Welcome to Orientation"
};

Content = new StackLayout
{

     Spacing = 20,
     Padding = new Thickness(10),
     Orientation = StackOrientation.Horizontal,
     Children = { Label }
};

Children

 

var Label = new Label

{
    Text = "Welcome to Orientation"
};

Content = new StackLayout
{

     Spacing = 20,
     Padding = new Thickness(10),
     Orientation = StackOrientation.Vertical,
     Children = { Label }
};

Padding:スペースを使用してレイアウトを囲む

 

var Label = new Label
{
    Text = "Welcome to Orientation"
};

Content = new StackLayout
{

 Spacing = 20,
   Padding = new Thickness(10),
   Orientation = StackOrientation.Horizontal,
   Children = { Label }
};

Spacing:間隔

 

var Label = new Label
{
    Text = "Welcome to Orientation"
};

Content = new StackLayout
{
   Spacing = 20,
   Padding = new Thickness(10),
   Orientation = StackOrientation.Horizontal,
   Children = { Label }
};

 

目 次

 

コメントをお書きください

コメント: 2
  • #1

    Shiraz (金曜日, 27 8月 2021 01:32)

    Nice Design, I like it www.funnyjokeshome.com

  • #2

    Shiraz (金曜日, 27 8月 2021 01:32)

    <a href="www.funnyjokeshome.com>Funny Jokes</a>