Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to bind collection object in picker control

$
0
0

var pickerViewModel = new MvxPickerViewModel(picker);
picker.Model = pickerViewModel;
picker.ShowSelectionIndicator = true;
textFieldTitle.InputView = picker;

var set = this.CreateBindingSet<BrandView, BrandViewModel>();

set.Bind(pickerViewModel).For(p => p.ItemsSource).To(vm => vm.Products);

set.Bind(pickerViewModel).For(p => p.ce).To(vm => vm.Products[0].ProductName);
set.Bind(pickerViewModel).For(p => p.SelectedItem).To(vm => vm.SelectedProduct);

set.Apply();
In the PickerView I don't have the expected values. Its showing the namespace of the object.

I'm binding to a list of "Products", a Product object has ProductName. How can I set the "to be showed" value?


Viewing all articles
Browse latest Browse all 204402

Trending Articles