¿La cuadrícula de datos de WPF detecta si se visita la última fila o no?

I have a WPF Datagrid in my application and as there are more that 25000 rows should be loaded I have created a custom pagination working with shortcut keys.

Now I am wondering if there is any way to detect whether the last row of current page is visited so I can load next page and append it to my Datagrid without any shortcut keys or click?

Update: I have added an event to vertical scrollbar for datagrid, and still can't find a way to determine whether the last row has brought to view or not?

¿Alguna sugerencia?

preguntado el 23 de abril de 13 a las 13:04

When you say "visited", do you mean brought into View? If yes, then esta pregunta puede ayudar. -

@BrianS, Yes I meant brought to view. Thanks for the link, but still can't replicate this solution. -

1 Respuestas

OK, I found the trick:

following event helped me out:

> void dgScrollbar_ScrollChanged(object sender, ScrollChangedEventArgs
> e)
>         {
>             if (((System.Windows.Controls.ScrollViewer)(sender)).ContentVerticalOffset
> + e.ViewportHeight == e.ExtentHeight)
>             {
>                 LoadNextPageBinding_Executed(null, null);
>             }
>         }

Respondido 24 Abr '13, 06:04

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.