Hi Edgar,
Thanks for using Syncfusion product.
Requirement 1:
You can achieve your requirement “Defining Header to the SfListView” by using HeaderTemplate property.
Code example[XAML]:
In SfListView UG documentation, we have mentioned the examples in C# and XAML to define the header item. Please refer the below documentation for more details
For your reference, we have attached the sample also. Please find the sample link below,
Requirement 2:
Currently SfListView do not have support for PullToRefresh. Hence we have considered this as feature request. We are implementing the pull-to-refresh feature and it will be available in our upcoming 2017 volume 1 release which is scheduled to be rolled out by February 2017.
Regards,
Dinesh Babu Yadav |
Is this feature implemented?
How to implement pullToRefresh?
<pulltoRefresh:SfPullToRefresh x:Name="pullToRefresh"
ProgressBackgroundColor="#428BCA" RefreshContentHeight="50"
RefreshContentWidth="50" TransitionMode="Push" IsRefreshing="False">
<pulltoRefresh:SfPullToRefresh.PullableContent>
<syncfusion:SfListView x:Name="listView" ItemSize="120"
SelectionMode="None">
</syncfusion:SfListView>
</pulltoRefresh:SfPullToRefresh.PullableContent>
</pulltoRefresh:SfPullToRefresh> |
pullToRefresh.Refreshing += PullToRefresh_Refreshing;
private async void PullToRefresh_Refreshing(object sender, EventArgs args)
{
pullToRefresh.IsRefreshing = true;
await Task.Delay(2000);
for (int i = 0; i < 3; i++)
{
var blogsCount = pulltoRefreshViewModel.BlogsInfo.Count;
var item = new ListViewBlogsInfo()
{
BlogTitle = pulltoRefreshViewModel.BlogsTitle[blogsTitleCount - blogsCount],
BlogAuthor = pulltoRefreshViewModel.BlogsAuthers[blogsAuthorCount - blogsCount],
BlogCategory = pulltoRefreshViewModel.BlogsCategory[blogsCategoryCount - blogsCount],
ReadMoreContent = pulltoRefreshViewModel.BlogsReadMoreInfo[blogsReadMoreCount - blogsCount],
};
pulltoRefreshViewModel.BlogsInfo.Insert(0, item);
}
pullToRefresh.IsRefreshing = false;
} |
Using the pull to refresh
I found myself confronted with a problem which I find the solution, I
make it in the event that people are confronted:
My page has a "header" area containing action buttons for the entire list, then my sflistview. In order to position them on my page, I use a grid.
By adding the pushtorefresh, my sflistview as overflowed on my header and the pulltorefresh in itself did not work; The
problem comes from the fact that the Grid.Row is defined in the
sflistview, it must be moved in the definition of the pulltorefresh (the
1st) so that the grid position works and that the refresh also.
I have implemented the above mentioned method for Pull to Refresh functionality. But it's not calling refresh method
Yes it's working perfect now.