title: Xamarin forms picker data binding
body: <p>I have a Xamarin project that contains a page that has details about surgical cases.  I have added a picker that selects a list of eyes that can be linked to the surgical case.  The picker only shows the object, not the data from the list.  What am I doing wrong? 
  Here is the code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;forms:ContentPage
      x:Class="SxQiApp.EditSxCasePage"
      xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:forms="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.Core"
      xmlns:viewModels="clr-namespace:SxQiApp.ViewModels;assembly=SxQiApp"&gt;
  
      &lt;forms:ContentPage.BindingContext&gt;
          &lt;viewModels:SxCaseViewModel /&gt;
      &lt;/forms:ContentPage.BindingContext&gt;
  
      &lt;forms:StackLayout&gt;
          &lt;Label Text="Record" /&gt;
          &lt;Entry Text="{Binding SelectedSxCase.Record}" /&gt;
          &lt;Label Text="Case" /&gt;
          &lt;Entry Text="{Binding SelectedSxCase.Facesheet}" /&gt;
          &lt;Label Text="Return OR" /&gt;
          &lt;Switch IsToggled="{Binding SelectedSxCase.ReturnOr}" /&gt;
          &lt;Label Text="Complication" /&gt;
          &lt;Switch IsToggled="{Binding SelectedSxCase.Complication}" /&gt;
  
          &lt;Picker Title="Eye" ItemsSource="{Binding Eyes}" ItemDisplayBinding="{Binding Eyes}" /&gt; 
          &lt;Label Text="{Binding SelectedEye}" /&gt;
          &lt;Button Command="{Binding PutSxCaseCommand}" Text="Edit Case" /&gt;
          &lt;Button Command="{Binding DeleteSxCaseCommand}" Text="Delete Case" /&gt;
      &lt;/forms:StackLayout&gt;
  
  &lt;/forms:ContentPage&gt;
  </code></pre>
  
  <p>This is the Code Behind</p>
  
  <pre><code>using SxQiApp.ViewModels;
  using Xamarin.Forms;
  
  namespace SxQiApp
  {
      // XamlC is set in App.xaml.cs
      //[XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class EditSxCasePage : ContentPage
      {
          public EditSxCasePage()
          {
              InitializeComponent();
  
          }
  
          public EditSxCasePage(SxCaseViewModel SxCaseViewModel)
          {
              InitializeComponent();
  
              this.SxCaseViewModel = SxCaseViewModel;
              BindingContext = SxCaseViewModel;
  
  
  
          }
  
          public SxCaseViewModel SxCaseViewModel { get; }
  
      }
  }
  </code></pre>
  
  <p>This is the ViewModel</p>
  
  <pre><code>using SxQiApp.Models;
  using SxQiApp.Services;
  using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Runtime.CompilerServices;
  using System.Threading.Tasks;
  using System.Windows.Input;
  using Xamarin.Forms;
  
  namespace SxQiApp.ViewModels
  {
      public class SxCaseViewModel : INotifyPropertyChanged
      {
          private List&lt;SxCase&gt; _sxcase;
          private SxCaseDataService _sxCaseDataService = new SxCaseDataService();
          private SxCase _selectedSxCase;
          private List&lt;Eye&gt; _eye;
          private EyeDataService _eyeDataService = new EyeDataService();
          private Eye _selectedEye;
  
  
  
          public SxCase SelectedSxCase
          {
              get { return _selectedSxCase; }
              set
              {
                  _selectedSxCase = value;
                  OnPropertyChanged();
              }
          }
  
  
          public List&lt;SxCase&gt; SxCases
          {
              get
              {
                  return _sxcase;
  
              }
              set
              {
                  _sxcase = value;
                  OnPropertyChanged();
              }
          }
  
          public Command PutSxCaseCommand
          {
              get
              {
                  return new Command(async () =&gt;
                  {
                      var sxCaseDataService = new SxCaseDataService();
                      await sxCaseDataService.PutSxCase(_selectedSxCase.SxCaseId, _selectedSxCase);
                  });
              }
          }
  
          public Command DeleteSxCaseCommand
          {
              get
              {
                  return new Command(async () =&gt;
                  {
                      var sxCaseDataService = new SxCaseDataService();
                      await sxCaseDataService.DeleteSxCaseAsync(_selectedSxCase.SxCaseId);
                  });
              }
          }
  
  
          public ICommand AddRecordCommand =&gt; new Command(async () =&gt;
          {
  
              await _sxCaseDataService.PostSxCase(SelectedSxCase);
  
  
          });
  
  
  
          public SxCaseViewModel()
          {
  
  
              SelectedSxCase = new SxCase();
              GetSxCases();
  
              SelectedEye = new Eye();
              GetEyes();
          }
  
          public event PropertyChangedEventHandler PropertyChanged;
  
          protected virtual void OnPropertyChanged([CallerMemberName]string propertyName = null)
          {
              PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
          }
  
          private async Task GetSxCases()
          {
  
  
              SxCases = await _sxCaseDataService.GetSxCases();
          }
  
          public Eye SelectedEye
          {
              get { return _selectedEye; }
              set
              {
                  _selectedEye = value;
                  OnPropertyChanged();
              }
          }
  
  
          public List&lt;Eye&gt; Eyes
          {
              get
              {
                  return _eye;
  
              }
              set
              {
                  _eye = value;
                  OnPropertyChanged();
              }
  
          }
  
          private async Task GetEyes()
          {
  
  
              Eyes = await _eyeDataService.GetEyes();
          }
  
  
      }
  
  
  
  }
  </code></pre>