<?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="Packet_Sender_Mobile.PacketEditPage"
             >
        <ContentPage.Content>
        <TableView Intent="Form">
            <TableRoot>
                <TableSection Title="Packet Details">
                    <EntryCell Label="Packet name" Text="{Binding name}" Keyboard="Text" />
                    <EntryCell Label="To Address" Text="{Binding toip}"  Keyboard="Url" />
                    <EntryCell Label="To Port" Text="{Binding toport}" Keyboard="Numeric" />

                    <!--
                    <EntryCell Label="TCP/UDP" Text="{Binding method}" Keyboard="Text" />
                    -->
                    <ViewCell>
                        <StackLayout Orientation="Horizontal">
                            <Label Margin="20,20,0,0">TCP/UDP</Label>
                            <Entry  Placeholder="Method" x:Name="packetMethod" Keyboard="Text"  Unfocused="methodUnfocused"  Text="{Binding method}" />
                        </StackLayout>
                    </ViewCell>                
                </TableSection>
                <TableSection Title="Data">
                    <EntryCell x:Name="asciiEdit" Completed="asciiEditUnfocused"  Label="ASCII" Text="{Binding ascii}" Keyboard="Text" />
                    <EntryCell x:Name="hexEdit" Completed="hexEditUnfocused"  Label="HEX" Text="{Binding hex}" Keyboard="Text" />
                </TableSection>
                <TableSection>
                    <ViewCell>
                        <Button Text="Save" Clicked="OnSave" />
                    </ViewCell>
                    <ViewCell>
                        <Button x:Name="editCancel" Text="Cancel" Clicked="editCancel_Clicked" />
                    </ViewCell>
                </TableSection>
            </TableRoot>
        </TableView>
    </ContentPage.Content>
</ContentPage>