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,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hello again,
I have modified the sample, so now when there is a selected item on start up the text is left aligned. Basically I call the XamComboEditor's Focus method in the SelectionChanged event handler. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
This worked great when I add a new item, but when the item that is binded when the combobox is created, is longer then the width of the combobox, this does not work. I tried to add your solution to the initialized event + Loaded event, but it did not work.
I have modified the sample, so now it has the functionality you want. Basically I handled the XamComboEditor's SelectionChanged, GotFocus and LostFocus events and in their handlers I set the SelectionsStart Property of the SpecializedTextBox inside the editor to 0. Please let me know if this helps you or you have further questions on this matter.
Here is a different imange when pressing the focus button and the text is still not "left" aligned is a sort of manor. When the combo box width is shorter then the width of the displayed text