Add a Load More Button at the end of ListBox without losing Virtualization?

前端 未结 2 1181
暗喜
暗喜 2020-12-19 16:53

I know by editing the ListBox\'s default style like this, I can have a Button at the very end of the ListBox.



        
2条回答
  •  时光说笑
    2020-12-19 17:08

    I know this is an old post but in case some people stumble upon this:

    There is a LongListSelector control available out of the box in WP8 or as part of the Windows Phone Toolkit for WP7 which supports this scenario quite neatly. If you want to add specific content after the last item (or before the first item), you can simply set the ListFooter or ListHeader of the control. You can put any content inside and this content will be scrolled accordingly, together with the rest of the items.

    So for WP7 this would look like this:

    
        
            
                

    where toolkit is xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

提交回复
热议问题