title: Xamarin Forms - Picker set selected item
body: <p>I have a picker where I update the current address of the user/retailer. The selected value is from my database I want to set the selected item of my picker.</p>
  
  <p>My XAML:</p>
  
  <pre><code>&lt;local:CustomPicker x:Name="provincePicker" SelectedIndexChanged="provincePicker_SelectedIndexChanged" Unfocused="provincePicker_Unfocused" SelectedItem="{Binding DisplayText}" ItemsSource="{Binding ProvinceID}" ItemDisplayBinding="{Binding DisplayText}" StyleClass="fieldForm" IsEnabled="True"&gt;
  &lt;local:CustomPicker.FontFamily&gt;
       &lt;OnPlatform x:TypeArguments="x:String"&gt;
           &lt;On Platform="Android" Value="HelveticaNeueLTPro-Lt.otf#HelveticaNeueLTPro-Lt"/&gt;
       &lt;/OnPlatform&gt;
  &lt;/local:CustomPicker.FontFamily&gt;
  </code></pre>
  
  <p></p>
  
  <p>XAML.CS</p>
  
  <pre><code>var getCode = conn.QueryAsync&lt;RetailerGroupTable&gt;("SELECT * FROM tblRetailerGroup WHERE RetailerCode=?", code);
  var resultCount = getCode.Result.Count;
  
  if (resultCount &gt; 0)
  {
     var result = getCode.Result[0];
     provincePicker.SelectedItem = result.ProvinceID;
  }
  </code></pre>