3

I am trying to add a header for each column associated with my gridview, such that when the page is wide enough to display multiple rows of items, a column header should be displayed at the top of each column and be removed if the page is shrunk so that the column no longer fits.

The end result would look something like this: 2 columns with headers

And when resized it would dynamically update to this: 1 column with 1 header

1 Answers1

0

Check the DataGrid control which is a new addition to the Windows Community Toolkit. This is ideal for display of table-like data. You can then use AdaptiveTriggers to hide columns depending on the width of the window (by setting DataGridTextColumn.Visibility to Collapsed)

Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91
  • Thanks for the suggestion. I am not really looking for a _table-like_ view though, its more like I want a listview, but instead of scrolling when there is no more room for the items on the page, I want to create an additional list-view to the right. I think that is what I am going to try to create using an AdaptiveTrigger though. – Michael Tweet Aug 10 '18 at 19:05