→ 개발/WPF
[WPF] 콤보박스에서 아이템 선택시 문자열 가져오기
벅스쭌
2010. 7. 14. 18:34
반응형
selectionchanged 이벤트 발생
private void EventList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ComboBox currentComboBox = sender as ComboBox;
if (currentComboBox != null)
{
ComboBoxItem currentItem = currentComboBox.SelectedItem as ComboBoxItem;
if (currentItem != null)
{
MessageBox.Show(currentItem.Content.ToString());
}
}
}
참고 : 훈스닷넷
반응형