EntryCell is a Cell with a label and a single line text entry field.
Reading this article, you will learn how to use Entry Cells with Table View in Xamarin Forms application for Android and Universal Windows Platform with XAML and Visual C# in cross platform application development.
The following important tools are required for developing UWP,
- Windows 10 (Recommended)
- Visual Studio 2017 RC Community/Enterprise/Professional Edition (It is a Free trial software available online)
- Using Visual studio 2017 Installer, Enable the feature of Mobile development with .NET.
Now, we can discuss step by step app development.
Step 1
Open Visual studio 2017 RC -> Start -> New Project-> Select Cross-Platform (under Visual C#->Cross Platform App) >> Give a suitable name to your App (XamFormEntryCell) ->OK.
Step 2
Select the Cross Platform template as Blank APP ->Set UI Technology as Forms and Sharing as PCL. Afterwards, Visual Studio creates 4 projects (Portable, Droid, iOS, UWP) and displays Getting Started.XamarinPage
Step 3
In MainPage.Xaml Page , add Label and EntryCells in TableView.
- <StackLayout>
- <Label Text="Xamarin Form Entry Cell Demo in Android and UWP " VerticalOptions="Center" HorizontalOptions="Center" />
- <TableView Intent="Form">
- <TableRoot>
- <TableSection Title="Application Form">
- <EntryCell Label="Name:" HorizontalTextAlignment="Start" LabelColor="Black" Placeholder="Enter Your First Name Here" />
- <EntryCell Label="Age :" LabelColor="Black" Placeholder="Enter Your Age Here" />
- <EntryCell Label="Specialization :" LabelColor="Black" Placeholder="Enter Your Specialization Here" /> </TableSection>
- </TableRoot>
- </TableView>
- </StackLayout>
Step 4
We will test Android and UWP. So, we can set the Multiple Startup Projects as XamFormEntryCell.Droid and XamFormEntryCell.UWP (Universal Windows).
Step 5
Change the Configuration Manager settings. Go to Build -> Configuration Manager, uncheck the "Build" and "Deploy" options for iOS, and check for Droid and UWP.
Step 6
Deploy your app to Android Emulator and Local Machine (UWP). The output of the XamFormEntryCell App is given below.
After entering the information.
Summary
Now, you have successfully tested Entry Cells in Xamarin Forms application for cross-platform application development using Visual C# and Xamarin.