My WPF Listbox should have two columns. The one on the right should have a width of say 20 and the left column should 'fill' the rest of the listbox.
Here is the listbox definition:
<ListBox ItemsSource="{Binding Path=Stuff}">
<ListBox.ItemTemplate>
<DataTemplate>
<DockPanel LastChildFill="True">
<TextBlock Text="{Binding Path=Count}" DockPanel.Dock="Right" Width="20">
</TextBlock>
<TextBlock Text="{Binding Path=Name}">
</TextBlock>
</DockPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Does anybody have any idea? Any help would be greatly appreciated.