次のようにいくつかの ComboBoxes を設定しています。
<ComboBox Name="CB_OS" Grid.Row="5" ItemsSource="{Binding OS_Sellection}" SelectedIndex="0" Margin="2" SelectionChanged="OSSelectionChanged">
<ComboBox.ItemTemplate>
<DataTemplate>
<ComboBoxItem Content="{Binding Name}" IsSelected="{Binding IsSelected, Mode=TwoWay}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
ComboBox には ComboBoxItems が正しく入力されますが、テキスト (コンテンツ) をクリックしても項目が選択されません。選択した項目を実際に変更するには、テキストがない場所をクリックする必要があります。
これを次のように変更すると:
<ComboBox Name="CB_OS" Grid.Row="5" SelectedIndex="0" Margin="2" SelectionChanged="OSSelectionChanged">
<ComboBoxItem Content="OOOOOOOOO"/>
<ComboBoxItem Content="OOOOOOOOO"/>
<ComboBoxItem Content="OOOOOOOOO"/>
</ComboBox>
それは正常に動作します。
OS_Selection には、次のメンバーのみが含まれます。
private string name;
private bool isChecked;
private bool isSelected;
だから私の質問は次のとおりです: 行全体 (項目) をクリック可能にするにはどうすればよいですか?