❔ ListItemView equally share space header
Hello, i'd like to share the spare equally of my header in order to fill all the grid and remove the space at the right.
Have you an idea how to do it ?
2 Replies
<ListView
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:ItemsSource="{d:SampleData ItemCount=5}"
ItemContainerStyleSelector="{StaticResource stepStyleSelector}"
ItemsSource="{Binding Steps, UpdateSourceTrigger=PropertyChanged}">
<ListView.View>
<GridView>
<GridViewColumn
Width="56"
DisplayMemberBinding="{Binding Id}"
Header="ID"
HeaderContainerStyle="{StaticResource test}" />
<GridViewColumn
Width="56"
Header=""
HeaderContainerStyle="{StaticResource test}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Button Command="{Binding DeleteCommand}" Content="Delete" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<ListView
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:ItemsSource="{d:SampleData ItemCount=5}"
ItemContainerStyleSelector="{StaticResource stepStyleSelector}"
ItemsSource="{Binding Steps, UpdateSourceTrigger=PropertyChanged}">
<ListView.View>
<GridView>
<GridViewColumn
Width="56"
DisplayMemberBinding="{Binding Id}"
Header="ID"
HeaderContainerStyle="{StaticResource test}" />
<GridViewColumn
Width="56"
Header=""
HeaderContainerStyle="{StaticResource test}">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Button Command="{Binding DeleteCommand}" Content="Delete" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.