我怎样才能在下拉框中的SelectionChanged事件选定的文本 这里是我的代码选择的组合框的文本
<ComboBox x:Name="cboRecordType" Margin="2,0" Height="23" Grid.Column="1" VerticalAlignment="Center" SelectionChanged="ComboBox_SelectionChanged">
<ComboBoxItem Content="Weight"/>
<ComboBoxItem Content="Height"/>
<ComboBoxItem Content="Blood Pressure"/>
<ComboBoxItem Content="Blood Gulocose"/>
</ComboBox>
cboRecordType.Text是空的,没有cantain选定的文本,如何拿到
它会返回以下值 {System.Windows.Controls.ComboBoxItem:Weight} 但我只需要重量我怎么能得到它 – 2010-05-18 06:50:30
@Asim - 使用SelectedItem.Content? – Gishu 2010-05-18 07:50:02
@Gishu:没有看到SelectedItem的内容的任何属性 – 2010-05-18 09:10:05