I want to get the value that is typed in the ribbon combobox to filter my listview but it doesn't have a "on text changed event" and if i use the KeyUp/Down event or PreviewTextIntput it resets the value of the combobox
And if i try it like below the combobox.text
gets the right value but the selection begins in the beginning of the combobox.
private _name as String
Private Sub cboName_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles cboName.KeyUp
cboName.Text = _name
End Sub
Private Sub cboName_PreviewTextInput(ByVal sender As Object, ByVal e As System.Windows.Input.TextCompositionEventArgs) Handles cboName.PreviewTextInput
_name += e.Text
End Sub
using a ribbonComboBox - from Microsoft http://msdn.microsoft.com/en-us/library/ff799534.aspx download link: http://www.microsoft.com/download/en/details.aspx?id=11877
You could use binding with the UpdateSourceTrigger set to ProperyChanged on the Text property of the ComboBox:
Text="{Binding MyText, UpdateSourceTrigger=PropertyChanged}"
In this way, each time text is added or removed the binded property value will be changed.So you could do whatever you want each time the text is changed. Similar to "on text changed" event that you're looking after.