<ComboBox Name="ASelect" Width="180" Height="27" SelectedIndex="0" HorizontalContentAlignment="Center" VerticalAlignment="Center" SelectionChanged="ASelect_SelectionChanged">
<ComboBoxItem HorizontalContentAlignment="Right" VerticalContentAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="a.png" Height="18" Width="22" />
<Label Content=" "/>
<TextBlock Width="150" Name="All"> All Values</TextBlock>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem HorizontalContentAlignment="Left">
<StackPanel Orientation="Horizontal">
<Image Source="tick.png" Height="24" Width="24" />
<TextBlock Width="150"> New Values</TextBlock>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem HorizontalContentAlignment="Left">
<StackPanel Orientation="Horizontal">
<Image Source="question.png" Height="24" Width="24" />
<TextBlock Width="150"> Old Values</TextBlock>
</StackPanel>
</ComboBoxItem>
</ComboBox>
• 如何从多column combo箱中获取选定项目的价值。 我想得到“所有价值观”的文字24的价值。 我尝试使用以下法典,但把它当作脚石,
string selectionString = ((ComboBoxItem)ASelect.SelectedItem).Content.ToString();