'WPF Wrap Panel that outlines 4 columns at a time
I have a list view with a wrap panel as its itemsPanelTemplate. The items in the wrap panel are going to be displayed in pages in groups of 28. I would like to draw a box around every 28 items, or every 4 columns so that you "preview" the page layout more easily.
If not a box, vertical lines after every 4th column would do. Thank you for taking the time to read my question.
Solution 1:[1]
In order to add a border for each list view item (28 items each), you can define the ItemContainerStyle like this.
<ListView>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="BorderBrush" Value="DarkGray"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="3"/>
</Style>
</ListView.ItemContainerStyle>
</ListView>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrew KeepCoding |
