I have a WPF combobox and a button as given below
<ComboBox Name="cmbExpressions" IsEditable="True"/>
<Button x:Name="btnSubmit" Content="Apply Selected" Click="btnSubmit_Click"/>
Now, I have written some text in the combobox at runtime say
stackoverflow,sometext,someothertext.
After that by using mouse, say I have highlighted "sometext".
Now I clicked on the Submit button and I am expecting to get the
output as only the
selected /highlighted text of the combobox which is "Sometext" here
.
I have tried a lot with selected item, text etc. but nothing worked.
How can I achieve this.
I am using C# 3.0 & WPF
Thanks