How can I make a column in a listbox in WPF the same width for all items?
I have a ListBox with an ItemTemplate consisting of a TextBlock and a ComboBox . The problem is that the width of the text inside the TextBlock is not the same for each item and the ComboBox controls are not aligned. How can I set the TextBlock in the template so all items are the same width, that is the one of the widest? Here is my xaml: <ListBox MinHeight="100" ItemsSource="{Binding Trainees}"> <ListBox.ItemTemplate> <DataTemplate> <Grid Margin="1"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock VerticalAlignment="Center" Grid.Column=