<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:c="clr-namespace:XamarinStudy.CustomViewCells;assembly=XamarinStudy"
             x:Class="XamarinStudy.Views.SampleTableViewSimpleRegisterPage">
    <ContentPage.Content>
        <TableView>
            <TableRoot>
                <TableSection Title="ID">
                    <EntryCell Placeholder="Minimum 6 characters"/>
                </TableSection>
                <TableSection Title="Password">
                    <ViewCell>
                        <Entry IsPassword="True" Placeholder="Minimum 8 characters"/>
                    </ViewCell>
                </TableSection>
                <TableSection Title="e-Mail">
                    <EntryCell Placeholder="e-Mail address" Keyboard="Email"/>
                </TableSection>
                <TableSection>
                    <ViewCell>
                        <StackLayout Orientation="Horizontal">
                            <Label Text="Additional Info"/>
                            <Switch x:Name="notifySwitch" HorizontalOptions="EndAndExpand" PropertyChanged="notifySwitch_PropertyChanged"/>
                        </StackLayout>
                    </ViewCell>
                </TableSection>
                <TableSection>
                    <ViewCell>
                        <StackLayout Orientation="Horizontal" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" BindingContext="{x:Reference notifySwitch}" IsVisible="{Binding IsToggled}">
                            <Button x:Name="sexButton" Text="Select" Clicked="sexButton_Clicked"/>
                            <Label x:Name="sexLabel" Text="Sex" VerticalTextAlignment="Center"/>
                        </StackLayout>
                    </ViewCell>
                </TableSection>
                <TableSection>
                    <c:CustomViewCell1 x:Name="customCell" Title="Job" Detail="Select after tap" Tapped="customCell_Tapped"/>
                </TableSection>
            </TableRoot>
        </TableView>
    </ContentPage.Content>
</ContentPage>