Hey.
I have a combo box and when I leave the combo box with tab, enter or any other manor and lose focus I would like for the text to left align.
Well if I click on a dropdown item and then if I leave the combobox it will make the text left align on lost focus.
How could I make the text box in the combo editor always left align text?,
Thanks in advance :)
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side(the text is aligned on the left all the time). If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
Thanks for the fast reply. Your example works only if the text for the display item is shorter then the width combo box. If the length of the text is longer it does only show the end of the text and not the start of the text.
I was trying to use this, but it doesn't work if the user is keyboard centric. I can't tab out of the comboBox, nor can I figure out how to fix it.
Hey Laura.
If you could be more specific I can try out the issue you have, I did not have any issues after I implemented the fix. I am a bit curious, when do you create your view and viewModel. And do you use the constructor to populate the properties that are exposed to the view?
Øyvind
We have had to implement several hacks to get the functionality wanted. This hacks are starting to be problematic when we move forward to add new functionality.
Will this problem be fixed anytime soon??
Hello Øyvind,
Currently this is the designed behavior of the XamComboEditor, so if you want it to be changed, you can suggest this as new product idea here:
http://ideas.infragistics.com/
Hi Stefan.
I have added this request. So if we are lucky we get a fix where we dont need a dispatcher thread to set focus to the controler when we create a view.
http://ideas.infragistics.com/forums/192363-wpf/suggestions/6205536-xamcombobox-correctly-left-align-text
Cheers,