Skip to content

Instantly share code, notes, and snippets.

@tomwis
Created November 23, 2017 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomwis/f90223de06c1140c509fccb4272ca028 to your computer and use it in GitHub Desktop.
Save tomwis/f90223de06c1140c509fccb4272ca028 to your computer and use it in GitHub Desktop.
var picker = new Picker()
{
DisplayPropertyName = nameof(PickerItem.DisplayName)
};
Add(picker);
var set = this.CreateBindingSet<MyView, MyViewModel>();
set.Bind(picker).For(v => v.ItemsSource).To(vm => vm.PickerItems);
set.Bind(picker).For(v => v.SelectedItem).To(vm => vm.SelectedItem).TwoWay();
set.Apply();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment