Reputation: 88197
I have set my ListBox.ItemTemplate
to something like below
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="10">
<TextBlock Text="{Binding Args}" />
<ProgressBar Value="{Binding Progress}" Height="10" />
<TextBlock Text="{Binding Status}" />
<TextBlock Text="{Binding Result}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
The result is
How can I make the StackPanel
fill the entire width of the ListBox
?
Upvotes: 3
Views: 6033
Reputation: 136613
Off the top of my head, Set the HorizontalContentAlignment property of the Listbox to Stretch.
Upvotes: 5