none
Don't see a loading symbol

    Question

  • Hello,

     

    I've installed SL 5 VS tools and created a PivotViewer control.  The control is tied to a collection of 1000 + items.   When the control is loading (takes a few seconds cause of the numbe of items), I don't see the "Loading..." animation in the pivotviewer control that I see in other examples. 

    Can someone tell me how to get the "Loading ..." animation to show in the PivotViewer SL 5 Control so that my users know that the items are loading.

     

    Thanks.

    Thursday, January 05, 2012 2:27 PM

Answers

  • Thanks for the help.  Unfortunately that event is only thrown on initial load of the control.  I have decided to not use PivotViewer any longer since it's very difficult to do customizations on it and there is very little documentation/examples on the new SL5 PivotViewer control.  Thanks again for your help.

    Monday, January 09, 2012 1:20 PM

All replies

  • That is because the old 'collectionviewerloadingvisual.xaml' and supporting code is not in SL5 PV. If you want a loading animation visual you will have to roll your own and display it in front of the PV control.

    The collection loading is now handled away from the UI part so it kinda makes sense as the downloading was when the old animation was visible.

    Friday, January 06, 2012 6:16 AM
  • Ok, I've added a BusyIndicator on top of the PivotViewer which hides once the collection is bound to the control's itemsource.  However, even though the viewer itself has loaded (i.e. the search fields, control), the content (tiles) within the control have not yet loaded and there is no way for me to know when that is completed?  I.e. it still takes a couple of seconds after the Content is set to the ItemsSource for the tiles to fully show up in the PivotViewer control.

    Friday, January 06, 2012 6:14 PM
  • I believe that the v1 PV worked that way too. I just scanned through the available events for SL5 PV and the last event to fire is StateSynchronizationFinished. If you try using that you may get a more acceptable solution:

    MyPV.StateSynchronizationFinished += new EventHandler(MyPV_StateSynchronizationFinished);
    void MyPV_StateSynchronizationFinished(object sender, EventArgs e)
    {
        MyPV.StateSynchronizationFinished -= MyPV_StateSynchronizationFinished;
        this.Dispatcher.BeginInvoke( () => <your method to hide busy ind > );
    Saturday, January 07, 2012 7:18 AM
  • Thanks for the help.  Unfortunately that event is only thrown on initial load of the control.  I have decided to not use PivotViewer any longer since it's very difficult to do customizations on it and there is very little documentation/examples on the new SL5 PivotViewer control.  Thanks again for your help.

    Monday, January 09, 2012 1:20 PM
  • For me, hooking up the Busy indicator display to these two events seems to have done the trick (my next step woudl have been to load/unload the control everytime I load a new collection and rely only StateSynchronizationFinished, but it seems the IsEnabled event is firing reliably)

    pivotViewer.StateSynchronizationFinished += (sender, e) => { BusyIndicator.IsBusy = false; };
    pivotViewer.IsEnabledChanged += (sender, e) => { BusyIndicator.IsBusy = !pivotViewer.IsEnabled; };

    However, this broke my adorner commands... I hope the team at Microsoft will soon provide a reliable event to hook into.

    Thursday, January 26, 2012 12:52 PM