Scroll WPF Listview to specific line

前端 未结 11 1032
孤城傲影
孤城傲影 2020-11-30 02:34

WPF, Browserlike app.
I got one page containing a ListView. After calling a PageFunction I add a line to the ListView, and want to scroll the new line into view:

11条回答
  •  难免孤独
    2020-11-30 03:22

    One workaround to this is to change the ItemsPanel of the ListView. The default panel is the VirtualizingStackPanel which only creates the ListBoxItem the first time they become visible. If you don't have too many items in your list, it should not be a problem.

    
       ...
       
          
             
          
       
    
    

提交回复
热议问题