Entry Cell In Xamarin.Forms Application For Android And UWP

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,

  1. Windows 10 (Recommended)
  2. Visual Studio 2017 RC Community/Enterprise/Professional Edition (It is a Free trial software available online)
  3. 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.
  1. <StackLayout>  
  2.     <Label Text="Xamarin Form Entry Cell Demo in Android and UWP " VerticalOptions="Center" HorizontalOptions="Center" />  
  3.     <TableView Intent="Form">  
  4.         <TableRoot>  
  5.             <TableSection Title="Application Form">  
  6.                 <EntryCell Label="Name:" HorizontalTextAlignment="Start" LabelColor="Black" Placeholder="Enter Your First Name Here" />  
  7.                 <EntryCell Label="Age :" LabelColor="Black" Placeholder="Enter Your Age Here" />  
  8.                 <EntryCell Label="Specialization :" LabelColor="Black" Placeholder="Enter Your Specialization Here" /> </TableSection>  
  9.         </TableRoot>  
  10.     </TableView>  
  11. </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.

Up Next
    Ebook Download
    View all
    Learn
    View all