Silverlight Hide view until view model has been loaded

Silverlight Hide view until view model has been loaded,silverlight,Silverlight,Is there a way in Silverlight to either prevent a view from being displayed until all of its data has been loaded by the View Model, or to display a loading graphic as the data is being loaded? The data is being loaded asynchronous which complicates things! Paul

Is there a way in Silverlight to either prevent a view from being displayed until all of its data has been loaded by the View Model, or to display a loading graphic as the data is being loaded?

The data is being loaded asynchronous which complicates things!

Paul


#1

You could simply expose a boolean property on your model (implementing INotifyPropertyChanged) to indicate if the data has been loaded or not and bind it to the visible property of a top-level container in your view.

It's easy to factor that out in a base class for your viewmodels and a style to be applied, if you use this in a number of views. I used to do this, but displayed a giant pale blue, translucent square with a "loading" label in the center and a spinning circular arrow.