下拉框-ComboBox

 

<ComboBox Name="cbBox" SelectionChanged="cbBox_SelectionChanged"></ComboBox>

 

ComboBoxItem item = new ComboBoxItem();
item.Name = voice.DisplayName;
item.Tag = voice;
item.Content = voice.DisplayName + " (Language: " + voice.Language + ")";
cbBox.Items.Add(item);

 

private void cbBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{

  ComboBoxItem item = (ComboBoxItem)(cbBox.SelectedItem);

}

posted @ 2016-10-01 11:45  ansen312  阅读(131)  评论(0编辑  收藏  举报