Windows Phone 8 checking If the stackpanel is in the visible area -


it's simple question. have number of stackpanels inside of scrollview. want them raise event when there visible user(via scrolling).

thanks in advance.

check this page out. shows how determine if element in scrollviewers viewport.

// position of visual inside scrollviewer     generaltransform childtransform = containedobject.transformtoancestor(scrollviewerobj); rect rectangle = childtransform.transformbounds(new rect(new point(0,0),containedobject.rendersize));  //check if elements rect intersects of scrollviewer's rect result = rect.intersect(new rect(new point(0, 0), scrollviewerobj.rendersize),rectangle); //if result empty element not in view if (result == rect.empty) { //.... } else { //obj partially or visible //skip or bring obj in view. } 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -