Pull To Refresh doesn't work

8 posts, 1 answers
  1. Nolan
    Nolan avatar
    3 posts
    Member since:
    May 2013

    Posted 04 Jun 2013 Link to this post

    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
  2. Answer
    Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 05 Jun 2013 Link to this post

    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.
  3. DevCraft banner
  4. Nolan
    Nolan avatar
    3 posts
    Member since:
    May 2013

    Posted 05 Jun 2013 Link to this post

    Yes, this does fix the problem. Out of curiosity, what does the UseOptimizedManipulationRouting do to the JumpList?
  5. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 07 Jun 2013 Link to this post

    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.
  6. Mikael
    Mikael avatar
    10 posts
    Member since:
    Jun 2012

    Posted 04 Oct 2013 Link to this post

    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?
  7. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 04 Oct 2013 Link to this post

    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.
  8. Mikael
    Mikael avatar
    10 posts
    Member since:
    Jun 2012

    Posted 04 Oct 2013 Link to this post

    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 });
    }
  9. Todor
    Admin
    Todor avatar
    778 posts

    Posted 09 Oct 2013 Link to this post

    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.
Back to Top
DevCraft banner