How can we Visualize data in an ObservableCollection or List which is set as ItemSource of ItemsControl? We are using ItemsControl within a ScrollViewer to make a custom collections control, due to some technical reasons(Design Constraints), we can not use ListView, or GridView controls which supports VirtualizingStackPanel and Data Virtualization through ISupportIncremental, so we must use ItemsControl within a ScrollViewer. So how can our ScrollViewer control notify the bound observable collection that scrolling has come to an end and load more data into the ObservableCollection, I found some information on Random access data virtualization but not sure how would i implement that in my WinRT, C# Custom Control project, and sample codes would be helpful
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
If you're implementing a custom list control (which you are if you're not using
ListView
,GridView
orListBox
) then theScrollViewer
would need to be a part of its template, so you can listen to itsViewChanging
andViewChanged
events that haveIsInertial
andIsIndeterminate
properties which you could use to see if scrolling has stopped and you could possibly use these to decide whether you have time to get more data or just put some placeholder values in the items source. You would also likely have an items source property and since you want to do your own virtualization - you don't really need to care aboutISupportIncremental
although you could use it as a (hopefully) good example. You get to implement your own virtualizing panel and the source list. Your view change events from theScrollViewer
and the layout of your panel would drive what gets loaded from the items source.As for sample code - I haven't seen any, but would love to see some as well!