In this answer , whose question has a bit more detail about the implementation in question, you can see an example of how to use this feature.
Basically, you can use the SelectedItem
property of Picker
to do the binding with your View Model .
As you did not share the code, I also do not know how to give a specific answer, but it would look something like this:
In view model create the property representing the selected item :
public class MinhaViewModel: INotifyPropertyChanged
{
...
private Objeto objetoSelecionado;
public Objeto ObjetoSelecionado
{
get { return objetoSelecionado; }
set
{
if(objetoSelecionado != value)
{
objetoSelecionado = value;
OnPropertyChanged("ObjetoSelecionado");
}
}
}
...
}
In the XAML of the page, make Binding
with equivalent property:
<Picker SelectedItem="{Binding ObjetoSelecionado}"
ItemsSource="{Binding ListaObjetos}"
...
/>
I hope I have helped.