WPF - Making ListView (GridView) Scrolling when there is too much data?

<Grid>
  <ListView ItemsSource="....">
    <ListView.View>
      <GridView>
        <GridViewColumn ......../>
      </GridView>
    </ListView.View>
  </ListView>
</Grid>

      

When there are thousands of lines, the aforementioned XAML results in the size being Grid

larger than the form and the data being hidden.

What I want to do is keep it ListView

so that it fills the grid (which fills the form) and that the vertical scroll bar scrolls through the items (leaving the title bar on top), just like the WinForm grid.

Can anyone tell me how to achieve this? I don't want to use third party components.

thank

+2


source to share


1 answer


Presumably yours is Grid

hosted in StackPanel

. Get rid of it and it should work fine.



+4


source







All Articles