This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var picker = new Picker() | |
{ | |
DisplayPropertyName = nameof(PickerItem.DisplayName), // we właściwości DisplayName mamy nazwę pliku z obrazkiem lub nazwę z Asset Catalogu | |
ContentType = PickerDisplayContentType.Image, // Domyślna wartość to PickerDisplayContentType.Text | |
ContentImageSize = new CGSize(32, 32), // Domyślna wartość to 32x32 | |
ContentImageAlignment = UIControlContentHorizontalAlignment.Center // Domyślna wartość to UIControlContentHorizontalAlignment.Left | |
}; | |
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