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

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -