Renderer Base Classes and Native Controls

Rendering Xamarin.Forms controls

PDF for offline use
Related Videos:

Let us know how you feel about this


0/250

last updated: 2016-04

Every Xamarin.Forms control has an accompanying renderer for each platform that creates an instance of a native control. This article lists the renderer and native control classes that implement each Xamarin.Forms page, layout, view, and cell.

With the exception of the MapRenderer class, the platform-specific renderers can be found in the following namespaces:

  • iOS – Xamarin.Forms.Platform.iOS
  • Android – Xamarin.Forms.Platform.Android
  • Android (AppCompat) – Xamarin.Forms.Platform.Android.AppCompat
  • Windows Phone 8 – Xamarin.Forms.Platform.WinPhone
  • WinRT – Xamarin.Forms.Platform.WinRT
  • Universal Windows Platform (UWP) – Xamarin.Forms.Platform.UWP

The MapRenderer class can be found in the following namespaces:

  • iOS – Xamarin.Forms.Maps.iOS
  • Android – Xamarin.Forms.Maps.Android
  • Windows Phone 8 – Xamarin.Forms.Maps.WP8
  • WinRT – Xamarin.Forms.Maps.WinRT
  • Universal Windows Platform (UWP) – Xamarin.Forms.Maps.UWP

Pages

The following table lists the renderer and native control classes that implement each Xamarin.Forms Page type:

Page Renderer iOS Android Android (AppCompat) Windows Phone 8 WinRT / UWP
ContentPage PageRenderer UIViewController ViewGroup Panel FrameworkElement
MasterDetailPage

PhoneMasterDetailRenderer (iOS – Phone)

TabletMasterDetailPageRenderer (iOS – Tablet)

MasterDetailRenderer (Android)

MasterDetailPageRenderer (Android AppCompat)

MasterDetailRenderer (Windows Phone)

MasterDetailPageRenderer (WinRT)

UIViewController (Phone)

UISplitViewController (Tablet)

DrawerLayout (v4) DrawerLayout (v4) FrameworkElement FrameworkElement (Custom Control)
NavigationPage

NavigationRenderer (iOS and Android)

NavigationPageRenderer (Android AppCompat)

NavigationPageRenderer (Windows Phone 8 and WinRT)

UIToolbar ViewGroup ViewGroup FrameworkElement FrameworkElement (Custom Control)
TabbedPage

TabbedRenderer (iOS and Android)

TabbedPageRenderer (Android AppCompat)

TabbedPageRenderer (Windows Phone 8 and WinRT)

UIView ViewPager ViewPager UIElement (Pivot) FrameworkElement (Pivot)
TemplatedPage PageRenderer UIViewController ViewGroup Panel FrameworkElement
CarouselPage CarouselPageRenderer UIScrollView ViewPager ViewPager UIElement (Panorama) FrameworkElement (FlipView)

Layouts

The following table lists the renderer and native control classes that implement each Xamarin.Forms Layout type:

Layout Renderer iOS Android Windows Phone 8 WinRT / UWP
ContentPresenter ViewRenderer UIView View FrameworkElement FrameworkElement
ContentView ViewRenderer UIView View FrameworkElement FrameworkElement
Frame FrameRenderer UIView ViewGroup Border Border
ScrollView ScrollViewRenderer UIScrollView ScrollView ScrollViewer ScrollViewer
TemplatedView ViewRenderer UIView View FrameworkElement FrameworkElement
AbsoluteLayout ViewRenderer UIView View FrameworkElement FrameworkElement
Grid ViewRenderer UIView View FrameworkElement FrameworkElement
RelativeLayout ViewRenderer UIView View FrameworkElement FrameworkElement
StackLayout ViewRenderer UIView View FrameworkElement FrameworkElement

Views

The following table lists the renderer and native control classes that implement each Xamarin.Forms View type:

Views Renderer iOS Android Android (AppCompat) Windows Phone 8 WinRT / UWP
ActivityIndicator ActivityIndicatorRenderer UIActivityIndicator ProgressBar ProgressBar ProgressBar
BoxView

BoxRenderer (iOS and Android)

BoxViewRenderer (Windows Phone and WinRT)

UIView ViewGroup Rectangle Rectangle
Button ButtonRenderer UIButton Button AppCompatButton Button Button
CarouselView CarouselViewRenderer UIScrollView RecyclerView FlipView FlipView
DatePicker DatePickerRenderer UITextField EditText DatePicker DatePicker
Editor EditorRenderer UITextView EditText TextBox TextBox
Entry EntryRenderer UITextField EditText PhoneTextBox/PasswordBox TextBox
Image ImageRenderer UIImageView ImageView Image Image
Label LabelRenderer UILabel TextView TextBlock TextBlock
ListView ListViewRenderer UITableView ListView LongListSelector ListView
Map MapRenderer MKMapView MapView Map MapControl
Picker PickerRenderer UITextField EditText EditText FrameworkElement ComboBox
ProgressBar ProgressBarRenderer UIProgressView ProgressBar ProgressBar ProgressBar
SearchBar SearchBarRenderer UISearchBar SearchView PhoneTextBox

SearchBox (WinRT)

AutoSuggestBox (UWP)

Slider SliderRenderer UISlider SeekBar Slider Slider
Stepper StepperRenderer UIStepper LinearLayout Border with a StackPanel and two Buttons

UserControl (WinRT)

Control (UWP)

Switch SwitchRenderer UISwitch Switch SwitchCompat Border with a ToggleSwitchButton ToggleSwitch
TableView TableViewRenderer UITableView ListView Grid with a TextBlock and ListBox ListView
TimePicker TimePickerRenderer UITextField EditText TimePicker TimePicker
WebView WebViewRenderer UIWebView WebView WebBrowser WebView

Cells

The following table lists the renderer and native control classes that implement each Xamarin.Forms Cell type:

Cells Renderer iOS Android Windows Phone 8 WinRT / UWP
EntryCell EntryCellRenderer UITableViewCell with a UITextField LinearLayout with a TextView and EditText DataTemplate with a Grid containing a TextBlock and a PhoneTextBox DataTemplate with a TextBox
SwitchCell SwitchCellRenderer UITableViewCell with a UISwitch Switch DataTemplate with a ToggleSwitch DataTemplate with a Grid containing a TextBlock and ToggleSwitch
TextCell TextCellRenderer UITableViewCell LinearLayout with two TextViews DataTemplate with a Button containing a StackPanel with two TextBlocks DataTemplate with a StackPanel containing two TextBlocks
ImageCell ImageCellRenderer UITableViewCell with a UIImage LinearLayout with two TextViews and an ImageView DataTemplate with a Button containing a Grid with an Image, and a StackPanel containing two TextBlocks DataTemplate with a Grid containing an Image and two TextBlocks
ViewCell ViewCellRenderer UITableViewCell View DataTemplate with a ContentPresenter DataTemplate with a ContentPresenter

Summary

This article has listed the renderer and native control classes that implement each Xamarin.Forms page, layout, view, and cell. Every Xamarin.Forms control has an accompanying renderer for each platform that creates an instance of a native control.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.