Share via

UWP ListView

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

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?

Developer technologies | Universal Windows Platform (UWP)

1 answer

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

    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>  
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.