Silverlight mvvm にコンボボックスがあります。コンボボックス名「SelectionChanged」のイベントを作成する必要があります。i 以下のコーディングを作成しますが、エラーが発生します。
注: Silverlight Light は使用していません。私は Silverlight5 とその Silverlight アプリケーションを使用しています。
<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>
この行にエラーが発生します。
<i:InvokeCommandAction Command="{Binding LoadCommand}" CommandParameter="{Binding SelectedItem, ElementName=myComboBox}" />