Customizing the row template

Xamarin.Forms has four built-in cell types:

  • EntryCell – a cell with a Label and a single-line text Entry field
  • SwitchCell – a cell with a Label and an on/off switch
  • TextCell – a cell with primary and secondary text
  • ImageCell – a cell that also includes an image

But this is not enough for every case that you need, or sometimes will not provide you with a nice result. Xamarin.Forms has another type, ViewCell, that you can use to customize the layout as desired.

You are welcome to extend any of these types to introduce custom functionality.

How to do it…

  1. In Visual Studio, go to the top menu and select File | New | Project. Choose the Blank App (Xamarin.Forms Portable) template, name it XamFormsCustomizingRows, and click OK.

Get Xamarin: Cross-Platform Mobile Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.