Filter / Group Delay Animation

7 posts, 1 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 03 May 2012 Link to this post

    Hi,

    I build an application where the user can change filtering / grouping.
    It works very well, but when the user changes filter / group it takes some time (from half a second to about 3 seconds) till the UI is responsible again.
    What I want to achieve is a kind of Hourglass reflecting that something lengthy is going on in the background.
    I think about you BusyIndicator - but my problems are:
    1.) I found no event for "filtering / grouping done"
    2.) I'm not sure if changing the filter- / GroupDescriptors will freeze the UI
    3.) I guess changing those descriptors must be done on the UI thread

    So my questions - is something like this possible - or do you have any idea how this could be done.

    Regards
    Manfred

  2. Answer
    Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 07 May 2012 Link to this post

    Hi Manfred,

    The data operations are done synchronously on the UI thread. Therefore, when you reset the data descriptors for your RadJumpList, you can be sure that they have completed after the code you are using to reset them. So, in this case, you can use the Busy Indicator in the following way:

    this.radBusyIndicator.IsRunning = true;
    this.Dispatcher.BeginInvoke(() =>
        {
            GenericGroupDescriptor<int, char> gd = new GenericGroupDescriptor<int, char>();
            gd.KeySelector = p => p.ToString()[p.ToString().Length - 1];
            this.radJumpList.BeginDataUpdate();
            this.radJumpList.GroupDescriptors.Clear();
            this.radJumpList.GroupDescriptors.Add(gd);
            this.radJumpList.EndDataUpdate();
            this.radBusyIndicator.IsRunning = false;
        });

    As you can see, before calling the code that resets my group descriptors, I start the Busy Indicator. After that, in a Dispatcher, I am resetting the group descriptors and stop the busy indicator at the end.

    This works as expected on my side.

    I hope this helps.

    Greetings,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 07 May 2012 Link to this post

    Hi Deyan,

    such a simple approach - I love this (should have found it myself) :)

    Event though my solution is a bit more complex (My group / filter descriptors are bound to the view model)
    it helps me to solve my problem.

    Thanks a lot for the answer
    Manfred
  5. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 11 Oct 2013 Link to this post

    Hi,

    is there a possibility to dynamically change grouping from viewmodel? Or should i just move this to codebehind?
  6. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 14 Oct 2013 Link to this post

    Hi Vitalii,

    Thanks for writing.

    Yes, it is possible to dynamically change the GroupDescriptors by binding them to an observable collection exposed by your ViewModel. You can read more about this here:

    http://www.telerik.com/help/windows-phone/radjumplist-features-group-descriptors.html

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  7. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 14 Oct 2013 Link to this post

    Thanks, guys, your support is awesome!

    PS: in the sample, it is a List, not Observable. But i got the idea about GroupDescriptorsSource  :)
  8. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 15 Oct 2013 Link to this post

    Hi Vitalii,

    Thanks for getting back to us.

    We will make sure to update the examples accordingly.

    We will consider this thread closed for now.

    Let us know should you have further questions or need assistance.

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner