How can I make a column in a listbox in WPF the same width for all items?

You can use the IsSharedSizeScope attached property. In your template definition, attach a “shared size group” to each column, like this:

<Grid.ColumnDefinitions>
    <ColumnDefinition SharedSizeGroup="col1" />
    <ColumnDefinition SharedSizeGroup="col2" />
</Grid.ColumnDefinitions>

… then define your ListBox as a shared size scope so it knows to size each “size group” the same way:

<ListBox Grid.IsSharedSizeScope="True">...</ListBox>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)