padding, margin of stack layout
This commit is contained in:
@@ -35,11 +35,13 @@ namespace XamarinStudy
|
||||
|
||||
//MainPage = new NavigationPage(new SampleNavigationPage());
|
||||
|
||||
TabbedPage tabbed = new TabbedPage();
|
||||
tabbed.Children.Add(new SampleElementPage3() { Title = "XAML_NEW" });
|
||||
tabbed.Children.Add(new SampleElementPage1() { Title = "XAML" });
|
||||
tabbed.Children.Add(new SampleElementPage2() { Title = "CS" });
|
||||
MainPage = tabbed;
|
||||
//TabbedPage tabbed = new TabbedPage();
|
||||
//tabbed.Children.Add(new SampleElementPage3() { Title = "XAML_NEW" });
|
||||
//tabbed.Children.Add(new SampleElementPage1() { Title = "XAML" });
|
||||
//tabbed.Children.Add(new SampleElementPage2() { Title = "CS" });
|
||||
//MainPage = tabbed;
|
||||
|
||||
MainPage = new SampleStackLayoutPage();
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
|
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="XamarinStudy.Views.SampleStackLayoutPage">
|
||||
<ContentPage.Content>
|
||||
<StackLayout Orientation="Vertical" BackgroundColor="Azure">
|
||||
<Label Text="Label1" BackgroundColor="Red"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
<Label Text="Label2" BackgroundColor="Orange"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
<Label Text="Label3" BackgroundColor="Yellow"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand" />
|
||||
<StackLayout Orientation="Horizontal" BackgroundColor="DarkSlateBlue" Padding="20">
|
||||
<Button Text="Button1"/>
|
||||
<Button Text="Button2"/>
|
||||
<Button Text="Button3"/>
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal" BackgroundColor="GreenYellow" Padding="10 50">
|
||||
<Button Text="Button1"/>
|
||||
<Button Text="Button2"/>
|
||||
<Button Text="Button3"/>
|
||||
</StackLayout>
|
||||
<StackLayout Orientation="Horizontal" BackgroundColor="Green" Margin="5">
|
||||
<Button Text="Button1"/>
|
||||
<Button Text="Button2"/>
|
||||
<Button Text="Button3"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace XamarinStudy.Views
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class SampleStackLayoutPage : ContentPage
|
||||
{
|
||||
public SampleStackLayoutPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -38,6 +38,9 @@
|
||||
<EmbeddedResource Update="Views\SampleNavigationPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Views\SampleStackLayoutPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Views\SampleTabPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
|
Reference in New Issue
Block a user