main
syneffort 2 years ago
parent b394c19b34
commit 5090cfa72f
  1. 4
      XamarinStudy/XamarinStudy/XamarinStudy/App.xaml.cs
  2. 26
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTableViewPage.xaml
  3. 25
      XamarinStudy/XamarinStudy/XamarinStudy/Views/SampleTableViewPage.xaml.cs
  4. 3
      XamarinStudy/XamarinStudy/XamarinStudy/XamarinStudy.csproj

@ -49,7 +49,9 @@ namespace XamarinStudy
//MainPage = new SampleRelativeLayoutPage(); //MainPage = new SampleRelativeLayoutPage();
MainPage = new SampleDisplayAlertActionSheetPage(); //MainPage = new SampleDisplayAlertActionSheetPage();
MainPage = new SampleTableViewPage();
} }
protected override void OnStart() protected override void OnStart()

@ -0,0 +1,26 @@
<?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.SampleTableViewPage">
<ContentPage.Content>
<TableView Intent="Menu">
<TableView.Root>
<TableSection Title="TableView Test">
<TextCell Text="TextCell" Detail="Detail"/>
<TextCell Text="TextCell2" Detail="Detail2" TextColor="Orange" DetailColor="Salmon"/>
<SwitchCell Text="SwitchCell"/>
<EntryCell Label="Name" Placeholder="Your name" LabelColor="Red"/>
<EntryCell Label="Age" Placeholder="Your Age" LabelColor="Blue" Keyboard="Numeric"/>
<ImageCell Text="Image" Detail="Detail" ImageSource="{OnPlatform Android=droid.png, UWP=assets/droid.png}"/>
<ViewCell>
<StackLayout Orientation="Horizontal">
<Label Text="Label" FontSize="Large"/>
<CheckBox/>
<Button x:Name="button1" Text="Button" Clicked="button1_Clicked"/>
</StackLayout>
</ViewCell>
</TableSection>
</TableView.Root>
</TableView>
</ContentPage.Content>
</ContentPage>

@ -0,0 +1,25 @@
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 SampleTableViewPage : ContentPage
{
public SampleTableViewPage()
{
InitializeComponent();
}
private void button1_Clicked(object sender, EventArgs e)
{
DisplayAlert("Titile", "Button is clicked!", "OK");
}
}
}

@ -53,6 +53,9 @@
<EmbeddedResource Update="Views\SampleStackLayoutPage.xaml"> <EmbeddedResource Update="Views\SampleStackLayoutPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Views\SampleTableViewPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\SampleTabPage.xaml"> <EmbeddedResource Update="Views\SampleTabPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>

Loading…
Cancel
Save