This is a migrated thread and some comments may be shown as answers.

Pull To Refresh doesn't work

7 Answers 138 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nolan
Top achievements
Rank 1
Nolan asked on 04 Jun 2013, 07:47 PM
Hello,

In the 2012 release (trial) of Windows Phone Controls (Using Windows Phone 7 on a WP8 device), when adding Pull To Refresh code to XAML everything works as expected. However, after upgrading the references to Windows Phone 8 controls (after I purchased them), pull to refresh no longer works.

What happens is that when you are at the very top of the list and you pull down on the rad jumplist control in the app, It has the down arrow saying "pull to refresh". Then when you pull it down - all the way until it stops pulling - it just stays on the down arrow and never refreshes. If the list is not at the very top (even a few pixels scrolled down) and I pull down it seems to work fine.

Any workarounds or patches out there for this issue?

Thanks,
   -Nolan Blew

7 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 05 Jun 2013, 06:10 AM
Hi Nolan,

Can you please try setting the UseOptimizedManipulationRouting property on RadDataBoundListBox/RadJumpList to false and see if this addresses the issue?

Thanks for your time.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Nolan
Top achievements
Rank 1
answered on 05 Jun 2013, 06:20 AM
Yes, this does fix the problem. Out of curiosity, what does the UseOptimizedManipulationRouting do to the JumpList?
0
Deyan
Telerik team
answered on 07 Jun 2013, 08:05 AM
Hi Nolan,

This property is used in context with some of the controls coming natively in Windows Phone such as Pivot and Panorama. It instructs the OS to either let the system handle the events, or the control itself. This is done with some performance considerations and works similar to the way Microsoft optimized the ListBox experience with the Mango update of Windows Phone: scrolling is handled by the system, while UI virtualization by the control itself, i.e. in two separate threads.

The general purpose of this approach is to let the input happen on a separate thread and thus make sliding or scrolling smoother. This helps in situations in which your Pivot items, for example, load big amounts of data upon swapping which could lead to worse user experience.

So, if you set this property to false, the input will be handled by the control itself, i.e. the Manipulation* events will be delegated to it. Since we use these events to implement the PullToRefresh logic, you need to set this property to false, otherwise we won't be able to detect manipulation and trigger the PTR experience.

You can read more about this property here:

http://msdn.microsoft.com/en-US/library/windowsphone/develop/system.windows.frameworkelement.useoptimizedmanipulationrouting(v=vs.105).aspx

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Mikael
Top achievements
Rank 1
answered on 04 Oct 2013, 08:49 AM
The UseOptimizedManipulationRouting doesn't seem to be available when building WP7 apps (MSDN also lists it only available for WP8).

Is there any other workaround for this, except than to upgrade the project to WP8?
0
Deyan
Telerik team
answered on 04 Oct 2013, 09:51 AM
Hi Mikael,

Thanks for writing.

This problems should not be present on Windows Phone 7. We cannot reproduce similar issues on our side.

Unfortunately similar issues are caused by architectural approaches which are beyond our scope and we cannot do much about it.

If you are currently experiencing similar issues with a WP7 app, it will be great if you send us a sample so that we can take a look and see if we can help in any way though.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Mikael
Top achievements
Rank 1
answered on 04 Oct 2013, 10:23 AM
Hi Deyan,

Thank you for the quick reply.

In my case the issue is present when the solution is built using the following projects:
* LauncherApp.WP7 (WP7 project)
* LauncherApp.WP8 (WP8 project)
* MainApp (WP7 project)

The LauncherApp project is ~empty, it just forwards the user to MainApp/MainPage.xaml. Launcher projects are platform specific (WP7 or WP8). (More reasoning behind this particular way of structuring projects can be found from here: http://mikaelkoskinen.net/wp7-wp8-codevelopment-startup-project/)

The actual app is inside the MainApp-project, which is always WP7 project. If this project contains a RadDataBoundListBox and if the WP8 version of the app is launched, we notice problems with pull-to-refresh.

But now that I know that this can be fixed with one property, I should be able to get around this issue. For example, the following code seems to work:

        if (Environment.OSVersion.Version.Major >= 8)
        {
            SetProperty(this.GroupList, "UseOptimizedManipulationRouting", false);
        }
 
private static void SetProperty(object instance, string name, object value)
{
    var setMethod = instance.GetType().GetProperty(name).GetSetMethod();
    setMethod.Invoke(instance, new object[] { value });
}
0
Todor
Telerik team
answered on 09 Oct 2013, 10:40 AM
Hello Mikael,

We will review the logic of RadDataBoundListBox and see if it makes sense to include such a property in WP7 version as well. For now you can use your workaround as it seems to be a possible solution.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
JumpList
Asked by
Nolan
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Nolan
Top achievements
Rank 1
Mikael
Top achievements
Rank 1
Todor
Telerik team
Share this question
or