Please help me determine how I can adjust this code make the Grid
in the ListView.ItemTemplate
stretch to fit horizontally. It presently is overflowing on the x-axis.
<ListView ItemsSource="{Binding Results}" Background="Blue" Margin="2" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" >
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Margin="3" Background="Pink" HorizontalAlignment="Stretch" ></StackPanel>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Grid Background="yellow" Margin="0,5" HorizontalAlignment="Stretch" >
<OtherContentHere Removed />
</Grid>
<DataTemplate>
</ListView.ItemTemplate>
</ListView>
I am open to any suggestions. Am I doing this correctly? or should I bind the Grid.Width
to the Column
? or something else?