I am using xamcomboeditor to show some items and I have made the search filter enabled for it.
I have some other xamcomboeditor also in the same page. When I enter some text in one xamcomboeditor that text stays in the xamcomboeditor. I want to get that text from the xamcomboeditor. From which property of xamcomboeditor will I get that text?.
In order to get the text of the XamComboEditor, you will need to get the SpecializedTextBox that is used to display that text. Unfortunately, there doesn't exist a way to get this directly from the XamComboEditor, but you can use the Infragistics.Windows.Utilities class or the VisualTreeHelper class to get it. A code example for this exists here.
Please let me know if you have any other questions or concerns on this matter.
Thanks for the reply.
My requirement is, I have two XamComboEditor in my page and I want to write a trigger in one XamComboEditor for the SelectionChanged event to clear the custom text entered in the second XamComboEditor.
Can this be done in MVVM pattern.
I am unsure how you would directly use a Trigger for this, but it is certainly possible to achieve this in an MVVM pattern.
To do this, I would recommend inclusion of the System.Windows.Interactivity class, which has an EventTrigger and an InvokeCommandAction class. Using these, you can set the EventTrigger to point at the SelectionChanged event and then use an InvokeCommandAction to fire an ICommand for this event. If you pass your dependent XamComboEditor to the command as a CommandParameter, you can clear the SelectedItem as well as the SpecializedTextBox's Text property to clear the custom text.
I am attaching a sample project to demonstrate the above. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.ComboSelectionMVVMDemo.zip