Hello,
The code snippet on this page is useful. However, when trying to using it, it can't find some members.
LogicalOperator, ComboItemFilter.Condition. In what assembly are these included ?
Thank
http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=xamComboEditor_Custom_Filtering.html
I found the issue. I was missing the DataManager assembly.
Question:
How can I get selected item to look exactly like the populated item ?
Thank you
Hello User101,
I am glad you were able to find the assembly that contains the filter-related items for the XamComboEditor.
Regarding getting the selected item to look exactly like the populated item, I am assuming this means that you have an ItemTemplate in your XamComboEditor and you are looking to have the selected item respect that ItemTemplate. Please let me know if this assumption is incorrect, as the following is based on it.
If your ItemTemplate is just text, I would recommend creating a separate property in your ViewModel that allows you to set the DisplayMemberPath to it. This will allow the selected item to look like the displayed item without any template-modification.
If it has other elements, such as images, I would recommend that you navigate to the generic.xaml file commonly found at C:\Program Files (x86)\Infragistics\<your version here>\WPF\DefaultStyles\XamComboEditor and pull in the default style for XamComboEditor. Inside this template, there exists a SpecializedTextBox element that I would recommend that you replace with a ContentPresenter. You can bind this ContentPresenter's Content property to the SelectedItem property of the XamComboEditor and bind the ContentTemplate property to the ItemTemplate property of your XamComboEditor.
I have attached a sample project to demonstrate the above. I hope this helps.
One limitation of this is that this solution may prevent your user from actually entering "edit mode" as the editable SpecializedTextBox in this case will have been replaced. The drop-down can still be opened, and the editor edited that way, but the auto-complete and "edit mode" will be gone with this route.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hi Andrew,
Thank you for your post. That does it.
The text gets left justified on ComboBoxEditor lost focus event. Is there was way to left justify when it has the focus too ?
I am rather confused by your most recent post. I would expect that if the XamComboEditor has its text left-justified, that it would remain as such when focused and when not. One thing that you can do to ensure this is to use the following style. Note, that this will only work if the modifications that you have made still include the SpecializedTextBox in the template of the XamComboEditor:
<ig:XamComboEditor.Resources> <Style TargetType="{x:Type igPrim:SpecializedTextBox}"> <Setter Property="HorizontalContentAlignment" Value="Right"/> </Style></ig:XamComboEditor.Resources>
Hello Andrew,
Sorry about the confusion. I should have provided more details.
I have attached a sample project to demo the issue. When an item is selected, it displays the last part of the text. When it looses focus it displays the first part of the text.
Thanks