views:

17

answers:

1

I have an application to which I want to add a progress bar. It works in most cases. In one case the time is actually taken because of binding and layout work which is asynchronous, so my progress bar is hidden before the work is actually done. Its rather large list of items shown within a scroll view. I can't use virtualizing because I need it to scroll smoothly as it is a touch screen application. So needless to say, it takes forever to bind and layout this list. Is there any way I can get notified that the binding and layout has finished?

I'm using Visual Studio 2010, but because of constraints I'm forced to use .Net 3.5.

+1  A: 

If you want to execute code when binding and rendering are completed, use this code.

Dispatcher.Invoke(new Action(() =>
    {
        // hide progress bar
    }), DispatcherPriority.Input);
Athari
Works great, now I just have to figure out how to actually keep my progress bar animating. It is indeterminate so it's frozen.
Jordan