UWP ListView

asked 2020-02-02T16:52:54.663+00:00
winprofessional 41 Reputation points

I am trying to create a UI in XAML having a row/column arrangement of data like in the below image:
2468-image.png

I am aware that there is GridView/ListView support in UWP XAML but could not find some code that creates a lit like the above.

Would it be possible to create such a UI in XAML/UWP?

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2020-02-03T01:42:44.113+00:00
    Fay Wang - MSFT 5,121 Reputation points

    Hello,​

    ​Welcome to our Microsoft Q&A platform!

    You can use DataGrid control from Windows Community toolkit, it provides a flexible way to display a collection of data in rows and columns, you can customize columns and header. But before you use it, you need to add Microsoft.Toolkit.Uwp.UI.Controls.DataGrid nuget package. About more details, you can refer to this document.

    .xaml:

    < Grid>  
            < controls:DataGrid x:Name="dataGrid1" ​  
        Height="600" Margin="12"​  
        AutoGenerateColumns="false"​  
        ItemsSource="{x:Bind MyViewModel.Customers,Mode=OneWay}" />​  
    ​  
    < /Grid>  
    
    No comments