We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfPullToRefresh not working on UWP

Thread ID:

Created:

Updated:

Platform:

Replies:

128590 Jan 31,2017 02:45 AM UTC Feb 3,2017 12:29 PM UTC Xamarin.Forms 6
loading
Tags: SfPullToRefresh
Matt Jones
Asked On January 31, 2017 02:45 AM UTC

Can you confirm if SfPullToRefresh works with UWP in Xamarin.Forms.
I am using v14.4.0.20 with Xamarin for Visual Studio v4.2.13.
I have a PCL project with Android, iOS and UWP projects.
SfPullToRefresh is working with the Android project on a Visual Studio Android emulator.
I cannot get SfPullToRefresh to work with the UWP project.
Your documentation includes UWP assembly references, although these look a little odd.
Your sample project only includes iOS and Android - not UWP.
If SfPullToRefresh does work with UWP, is there something extra that needs to be done, and can you add a UWP sample to your sample project.
Thanks and regards,
Matt Jones.

Matt Jones
Replied On January 31, 2017 10:35 AM UTC

I have more on this now, in addition to my initial post, having worked on it for most of the day...
My project uses a simple MasterDetailPage and the pulltorefresh page is meant to opened as a Detail page.

I cannot get SfPullToRefresh to work with UWP - it displays a blank screen and there is no "pull" available.
There is no error, just nothing displayed and no interaction.

I can get SfPullToRefresh to work with a simple, non ListView example in a Droid project, however when I try to include a ListView it does not work.
I have downloaded the updated sample that demonstrates a ListView, namely PullToRefreshSample1678894932.
When I run that sample (Droid project), and when I run my own Droid project, I get the same unhandled exception "System.NullReferenceException: Object reference not set to an instance of an object" error.

I have no idea how to get this to work.
Can anyone help please?


Ashwin Kumaravel [Syncfusion]
Replied On January 31, 2017 07:05 PM UTC

Hi Matt Jones,

Query #1 :“I cannot get SfPullToRefresh to work with the UWP project”

We have validated your query and created PullToRefresh sample based on your requirements. Please find it from the below link.

Sample link : PullToRefreshSample_

Query #2 : "System.NullReferenceException: Object reference not set to an instance of an object”

Currently we are validating the reported issue and we will provide you further details about this on February 1, 2017. 

Regards, 
Ashwin.k 


Matt Jones
Replied On February 1, 2017 08:02 AM UTC

Thank you.
I have had partial success with this now.

#1 (UWP)
It seems I just needed to make sure the PullableContent was getting sized as per your code block in MainPage()...
   this.SizeChanged += (object sender, EventArgs e) => {
    PullToRefreshSamplePage content = new PullToRefreshSamplePage();
    content.HeightRequest = content.PullableContent.HeightRequest = this.Height;
    content.WidthRequest = content.PullableContent.WidthRequest = this.Width;
    this.Content = content.Content;
   };

However, I have 2 further problems:
a) page resizing - your code creates a new page every time SizeChanged is called.
This is certainly not practical for my purposes, so I have been trying to resize the existing page instead.
I cannot get this to work - the PullableContent simply will not resize - perhaps this is why you are creating a new page each time?

b) animation icon - I don't see an animation icon while pulling to refresh and I could not see anywhere in your sample that set this at all.

#2 (Droid)
I was unable to run your sample project - thank you.
But I am still unable to run my Droid project.
I simply can't find where the problem is.
I get the same unhandled exception as before as soon as I try to set the MasterDetail.Detail page to the page containing the SfPullToRefresh code.


Ashwin Kumaravel [Syncfusion]
Replied On February 1, 2017 01:04 PM UTC

Hi Matt Jones,

Query #1:"PullToRefresh PullableContent not works with ListView"

We are able to reproduce the reported issue and the fix for this issue will be included in our upcoming Essential Studio Volume 1, 2017 release which is expected to be in first week of February.

We have created separate incident under your Direct track account ID to follow further follow ups.

Query #2:” The PullableContent simply will not resize”

We don’t have option to resize the PullableContent manually and the size of the pullable content will be taken automatically from the size of PullToRefresh ,this is not related to “SizeChanged” which we are using in sample.

Query #3: "I don't see an animation icon while pulling to refresh"

We have modified the sample and now the refreshing icon will work when we pull the pullablecontent.

Query #4:”unhandled exception "System.NullReferenceException in Droid” 
We have ensured and we are unable to reproduce the reported issue. We have created a working sample with MasterDetailPage.

Please find it in the below link.
Sample link-PullToRefreshSample 

Regards,
Ashwin.k

 




Matt Jones
Replied On February 2, 2017 11:08 AM UTC

Thank you for your updated sample.
I am really struggling with this.
I am just trying to get the UWP project going.
If I run your latest sample UWP project it works fine.
But I cannot get my UWP project to work.
I have spent the whole day again, I have used my project as a base and made a project like yours - and it doesn't work.
I have no idea why I cannot get this to work.
I have tried to make sure both projects are using identical versions of all components.
I would really appreciate it if you could tell me where I am going wrong - I have attached my project.
It just runs and gives a blank Detail page instead of the blue screen with Temp on it as yours does.
As far as I can tell, it is the same as your project except it doesn't work - I hope you can help with this and tell me what I am doing wrong.
I have spent way too much time on what should be a very very simple thing.
Thank you and regards,
Matt.

Attachment: mypulltorefresh_65b268d8.7z

Ashwin Kumaravel [Syncfusion]
Replied On February 3, 2017 12:29 PM UTC

Hi Matt, 
Query:"PullToRefresh gives a blank page in uwp platform".

We have ensured from our side and the provided sample [mypulltorefresh] working fine and we are unable to reproduce the reported issue.
We have attached the output screenshot reference of your project,


 
  
   
  
  If you are still facing the problem, please follow up the incident which is created under your account.  
  
Regards,
Ashwin k.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;