c# - How to get notice when ListView Items present? -


i have listview , listbox. listview shows data, binding list. , listbox used menu. when click item in menu, change binded source list, listview shows updated content. want visible items in listview through way:

var scrollviewer = getvisualchild<scrollviewer>(mylistviewcontrol); if (scrollviewer != null) {      console.writeline("visible item start index:{0}", scrollviewer.verticaloffset);      console.writeline("visible item count:{0}", scrollviewer.viewportheight); } 

so subscribe events. example, valuechanged , sizechanged event of scrollbar, selectionchanged event of listbox , binded list property inotifypropertychanged interface.

but previous view's scrollviewer.verticaloffset after listbox selectionchanged event raise every time.i think when recieve event notification, listview has not present view.

so, question is, how updated view's scrollviewer.verticaloffset , scrollviewer.viewportheight instead of previous view's? need request server these items.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -