Unfortunately, the first version of WPF does not provide a TextChanged event for a ComboBox like the one available for a TextBox. So, a workaround like the following is required:
[C#]
public Window1()
{
InitializeComponent();
this.comboBox.Loaded += delegate
{
TextBox editTextBox = comboBox.Template.FindName('PART_EditableTextBox', comboBox) as TextBox;
if (editTextBox != null)
{
editTextBox.TextChanged += delegate { MessageBox.Show(comboBox.Text); };
}
};
}
Share with