ListPicker Message.Attach error in Caliburn.Micro

I have the following XAML code on WP7:

<toolkit:ListPicker x:Name="ListPickerBwFactors" ItemsSource="{Binding BwFactors}" 
                            cal:Message.Attach="[Event SelectionChanged]=[Action ChangeBinarizeFactor(ListPickerBwFactors.ItemSelected)]">
</toolkit:ListPicker>

I get an error: Target must be FrameworkElement or CollectionViewSource

All I want to do is switch to my virtual machine, SelectedItem from ListPicker. What am I doing wrong?

+5
source share
1 answer

The current version of Silverlight on WP7 is based on Silverlight 3, one of the main limitations was that you could only bind the dependency properties to FrameworkElement or CollectionViewSource (unlike DependencyObject in WPF).

, , , Message.Attach Behaviors ( ActionMessage), FrameworkElements.

Caliburn ListPickerBwFactors.ItemSelected ActionMessage . , . SelectedItem ViewModel.

"Mango" WP7 Silverlight 4, .

+3

All Articles