How to add the "Download more" button at the bottom of the list results?

Hi, I'm calling a web service that returns results on pages. These results are tied to the list in which they are displayed. I want to add a β€œShow more” result button at the bottom of the list when they scroll to the bottom. Any resources or suggestions on how to do this are appreciated.

+6
source share
1 answer

Here is an example: How to add a control at the end of a ListBox .

This is a simplified version of the standard ListBox template:

 <Border CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ScrollViewer x:Name="ScrollViewer" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="Transparent" BorderThickness="0" TabNavigation="{TemplateBinding TabNavigation}"> <ItemsPresenter /> </ScrollViewer> </Border> 

You can wrap <ItemsPresenter /> with a StackPanel , this will allow you to place any content in the scroll StackPanel before or after the list items.

+6
source

Source: https://habr.com/ru/post/891365/


All Articles