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
Post a Comment