xaml - How to detect hitting the bottom of a grid within a scrollview in Xamarin Forms -


i using xamarin.forms display items websource in grid (within scrollview).

when user hits bottom of grid, want load more items , add them grid. know listview preferred displaying data in fashion (and listview has itemappearing event) sadly have use grid.

if helps, post code, im not sure if necessary here.

thanks in advance edit: here boring layout file:

<?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms"              xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"              x:class="myproject.mynamespace.layoutname"              sizechanged="onpagesizechanged">   <scrollview >     <absolutelayout x:name="mylayout">       <grid x:name="gridforitems" rowspacing="6" columnspacing="6">       </grid>     </absolutelayout>   </scrollview> </contentpage> 

i add rows, columns , items programmatically.

since had not gotten satisfying answer original question (how detect hitting bottom of scrollview) , have not found solution anywhere else on net going post how solved this.

note not elegant solution and, if have better answer, please post , accept best answer.

what did implement delegate scrolled event of scrollview.

myscrollview.scrolled += (sender, e) => { onscrolled(); }; 

within onscrolled have following if-clause determine whether have hit bottom of scrollview:

 private void onscrolled()  {     if(myscrollview.scrolly >= myscrollview.contentsize.height - myscrollview.height)     {       //handle hitting bottom     }  } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -