I'm trying to create the caliburn.micro platform for a new project, but I'm stuck in a ListPicker binding (the one from the toolbox). When I change the control to a simple DropDown, everything works as expected. I assume DropDown is working properly, due to the default convention here :
AddElementConvention<Selector>(Selector.ItemsSourceProperty, "SelectedItem", "SelectionChanged") .ApplyBinding = (viewModelType, path, property, element, convention) => { if (!SetBinding(viewModelType, path, property, element, convention)) return false; ConfigureSelectedItem(element, Selector.SelectedItemProperty,viewModelType, path); ApplyItemTemplate((ItemsControl)element, property); return true; };
ListPicker does not implement a selector, so I tried to add a user agreement to my loader:
static void AddCustomConventions() { AddElementConvention<ListPicker>(ListPicker.ItemsSourceProperty, "SelectedItem", "SelectionChanged") .ApplyBinding = (viewModelType, path, property, element, convention) => { ConventionManager.ConfigureSelectedItem(element, ListPicker.SelectedItemProperty,viewModelType, path); return true; }; }
Unfortunately this does not work. You can help?