I have a Grid inside a ListView . If I put the Grid outside the ListView , it stretches correctly to fill the screen. If I put it in a ListView , it is not. Here is my code
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <ListView HorizontalContentAlignment="Stretch"> <ListViewItem> <Grid> <Grid.RowDefinitions> <RowDefinition Height="40"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition Width="60"></ColumnDefinition> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Grid.Row="0">Title</TextBlock> <TextBlock Grid.Column="0" Grid.Row="1">Text</TextBlock> <Button Grid.Column="1">Pin</Button> </Grid> </ListViewItem> </ListView> </Grid>
How do I get a Grid to stretch and populate a ListView ?
source share