Welcome to Microsoft Q&A!
I suggest you could try to use DataGrid to realize it. The DataGrid control provides a flexible way to display a collection of data in rows and columns. You could try to use the
DataGrid.ItemsSource property to bind to a collection. And then you could set
DataGridView.AutoGenerateColumns Property to
true, then the columns will be created automatically.
For more details, you could refer to the Doc: Binding a DataGrid to a data source.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.