Display member alignment in ComboBox

Jun 30, 2009 at 6:08 PM
Edited Jun 30, 2009 at 6:15 PM


    Display text in ComboBox is a concatenated string from database table. The concatenated string (e.g. column1 (char(50)) + ' ' + column2) looks fine in SQL client. However it is messed up in ComboBox.  Obviously it's caused by different Character width. Is there any way to make those aligned nicely? Thanks very much for help.

Jun 30, 2009 at 8:31 PM

Hi Troy,

Could you please send a screenshot and/or simple repro application?  We're having trouble figuring out where the misalignment is happening.


Jun 30, 2009 at 8:45 PM

Thanks for reply. I did a couple of screenshots but don't know how to send to you. Thanks

Jun 30, 2009 at 9:38 PM

You can either create an issue under the Issue Tracker (it allows you to attach things), or you can post them at an alternate URL (Flickr or whatever) and send a link.  Thanks!

Jul 7, 2009 at 8:28 PM

I see that you posted a picture on the Issue Tracker (http://wpf.codeplex.com/WorkItem/View.aspx?WorkItemId=10245).  Thanks for sending that.  We took a look at this, but it's hard to tell what's going on without seeing your code - is there any way you could also attach a repro project to the Issue Tracker?  Is this happening within a DataGrid or is just in a standalone ComboBox?  How are you binding your ComboBox to the data?