-2

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.
enter image description here

If not a box, vertical lines after every 4th column would do. Thank you for taking the time to read my question.

  • It's a bit hard to understand what you want to achieve. Does the border mean selection? And can you elaborate on your image? or make a simpler version without its contents or colors? – Andrew KeepCoding Apr 11 '22 at 00:32
  • @AndrewKeepCoding The border does not mean selection, it only represents what items will be displayed on page one. The user can drag and drop the items to reorder them, and the border will make it easier to see what items are on what page. With out a border, the user has to count and keep track of columns in order to see what items are on what page. – John Schruben Apr 11 '22 at 16:03

1 Answers1

0

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>
Andrew KeepCoding
  • 7,040
  • 2
  • 14
  • 21