Created
December 17, 2017 13:13
-
-
Save tomwis/9f1d6f612aca75af68bf2d0b017f89be to your computer and use it in GitHub Desktop.
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