我怎樣才能在下拉框中的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