Reputation: 7424
Hello I'm making a call to a web service that returns results in pages. These results are bound to a listbox in which they are then displayed. I would like to add a "See More" results button to the bottom of the listbox when they scroll to the bottom. Any resources or suggestions on how to accomplish this are appreciated.
Upvotes: 6
Views: 1645
Reputation: 78487
Here is an example: How to add a Control at the end of Items of a ListBox.
This is simplified version of standard template of ListBox
:
<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 StackPanel
, this will allow you to place any content to the scrollable area before or after list items.
Upvotes: 6