In WPF ComboBox does not have SelectedText property.
Is there a way to achieve the same functionality as TextBox SelectedText has in WPF
You can get access to the ComboBox's TextBox by using:
var edit = (TextBox)myCombo.Template.FindName("PART_EditableTextBox", myCombo);
Then you can access the SelectedText property of that TextBox:
var selectedText = edit.SelectedText;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With