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
Thank you Andrew. Works Perfectly.
Hello User101,
I apologize for the delay in my response. I have taken a look at the sample project, and I see the behavior that you are referring to.
In this case, the text isn't really "justified" in either way. When you click on an item in the XamComboEditor in the attached sample project, the display text is longer than the combo editor itself, and the cursor defaults to the end of the text, rather than the beginning. Naturally, this leads to you seeing the end of the text.
If you would like to prevent this, I would recommend hooking into the SelectionChanged event of the XamComboEditor. In this event handler, you can use the Infragistics.Windows.Utilities class and its static GetDescendantFromType method to get the underlying SpecializedTextBox that the editor uses to display its selected item. You can then set the SelectionStart property of this textbox to "0," as this will move the cursor to the start of the display text. I would also recommend placing a little delay on this, by placing this code in a Dispatcher.BeginInvoke action running at Background priority. The full code for this would look like the following:
Dispatcher.BeginInvoke(new Action(() =>{ SpecializedTextBox text = Utilities.GetDescendantFromType(DemoXamComboEditor, typeof(SpecializedTextBox), false) as SpecializedTextBox; text.SelectionStart = 0; }), DispatcherPriority.Background);
I have also attached a modified version of the sample project you sent to demonstrate. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hello Andrew,
Have you had a chance to look at the sample project ?
Thanks
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.
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>