absolute layout page
This commit is contained in:
@@ -43,7 +43,9 @@ namespace XamarinStudy
|
||||
|
||||
//MainPage = new SampleStackLayoutPage();
|
||||
|
||||
MainPage = new SampleGridLayoutPage();
|
||||
//MainPage = new SampleGridLayoutPage();
|
||||
|
||||
MainPage = new SampleAbsoluteLayoutPage();
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
|
@@ -0,0 +1,19 @@
|
||||
<?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.SampleAbsoluteLayoutPage">
|
||||
<ContentPage.Content>
|
||||
<AbsoluteLayout>
|
||||
<BoxView BackgroundColor="MediumPurple" AbsoluteLayout.LayoutBounds="30,50,100,200"/> <!--x,y,width,height-->
|
||||
<Button Text="Button" BackgroundColor="ForestGreen" AbsoluteLayout.LayoutBounds="100,200,100,50"/>
|
||||
<Button Text="Button" BackgroundColor="Orange" AbsoluteLayout.LayoutBounds="10,20,0.2,0.3"/>
|
||||
<Button Text="Button" BackgroundColor="Salmon" AbsoluteLayout.LayoutBounds="0.2,100,20,30" AbsoluteLayout.LayoutFlags="XProportional"/>
|
||||
<Button Text="Button" BackgroundColor="DarkGoldenrod" AbsoluteLayout.LayoutBounds="0.2,0.1,20,30" AbsoluteLayout.LayoutFlags="YProportional"/>
|
||||
<Button Text="Button" BackgroundColor="OrangeRed" AbsoluteLayout.LayoutBounds="0.2,0.2,20,30" AbsoluteLayout.LayoutFlags="PositionProportional"/>
|
||||
<Button Text="Button" BackgroundColor="OrangeRed" AbsoluteLayout.LayoutBounds="20,30,0.2,0.3" AbsoluteLayout.LayoutFlags="SizeProportional"/>
|
||||
<Button Text="Button" BackgroundColor="Lime" AbsoluteLayout.LayoutBounds="20,30,0.5,30" AbsoluteLayout.LayoutFlags="WidthProportional"/>
|
||||
<Button Text="Button" BackgroundColor="MediumVioletRed" AbsoluteLayout.LayoutBounds="20,30,30,0.3" AbsoluteLayout.LayoutFlags="HeightProportional"/>
|
||||
<Button Text="Button" BackgroundColor="DarkOliveGreen" AbsoluteLayout.LayoutBounds="0.1,0.5,0.3,0.4" AbsoluteLayout.LayoutFlags="All"/>
|
||||
</AbsoluteLayout>
|
||||
</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 SampleAbsoluteLayoutPage : ContentPage
|
||||
{
|
||||
public SampleAbsoluteLayoutPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,6 +17,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Views\SampleAbsoluteLayoutPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Views\SampleContentPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
|
Reference in New Issue
Block a user