I have a Windows Phone 8.1 MVVM Light project and I am struggling to keep it Blendable.
As I see it I have a few options. I can load different view mode
Load your data on the page load event, using a Command, so you can take advantage of the await/async stuff. I don't know how this works with blend as I don't use it much.
View:
ViewModel:
public RelayCommand PageLoadedCommand { get; private set; }
public MyConstructor(IService serviceInjected)
{
PageLoadedCommand = new RelayCommand(async()=>await OnPageLoaded());
....
}
private async Task OnPageLoaded()
{
if(ViewModelBase.IsInDesignModeStatic)
{
var data = await GetSampleDataAsync();
//Do something..
}
}