On the ItemsPanelTemplate
, set the Margin
property to "0,0,0,-20".
Example:
<Grid Background="Black">
<ItemsControl ItemsSource="abcdefg" Background="White" VerticalAlignment="Top">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Margin="0,0,0,20" Background="Silver">
<TextBlock Text="{Binding}" Margin="5" />
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Margin="0,0,0,-20" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Grid>