Handle Triple click

if we ever want to do something when user triple clicks in/on the control, we can handle the PreviewMouseDown event and handle it like this

void ControlName_PreviewMouseDown(object sender, MouseButtonEventArgs e) 
 { 
  if (e.ClickCount == 3) 
  { 
  	MessageBox.Show("hello"); 
  } 
 }

Getting the text of the selecteditem in Combobox

When you look at the Text property in the SelectionChanged event of the ComboBox it returns the prior value
here is a way to get the right value (cb1 is the name of the ComboBox)

Add this in Window loaded event

DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(ComboBox.TextProperty, typeof(ComboBox));

dpd.AddValueChanged(cb1, OnTextChanged);
 

and here is the handler

private void OnTextChanged(object sender, EventArgs args)
        {
            MessageBox.Show(cb1.Text);
        }