The Property 'Command' was not found in type 'InvokeCommandAction' for combobox
I have a combobox in silverlight mvvm. i need to wrote the event for combobox name 'SelectionChanged'. i Create the coding below but it gives an error.. "The Property 'Command' was not found in type 'InvokeCommandAction' "
Note: I am not using Silverlight Light. I'm using Silverlight5 and its a silverlight application.
<ComboBox x:Name="myComboBox" Width="150" ItemsSource="{Binding Items}" > <ComboBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}"/> </StackPanel> </DataTemplate> </ComboBox.ItemTemplate> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding SelectedItem, ElementName=myComboBox}" /> </i:EventTrigger> </i:Interaction.Triggers> </ComboBox>
this line the error comes.
<i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding SelectedItem, ElementName=myComboBox}" />
Answers & Comments...
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog