windows-8-logoIt would be really useful if you could see all binded data in design time in VisualStudio or Blend.

To do this you should set page DataContext in xaml:

        <viewModels:MainPageViewModel />

In this case you will use the same ViewModel for design and run time. If ViewModel require different data loading logic for design and run time you should use Windows.ApplicationModel.DesignMode.DesignModeEnabled in ViewModel constructor to determine in witch mode ViewModel is loading. For example:

if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
//Load data from run time
//Load data from design time

If you want you can set different ViewModel for design time. To do this set d:Page.DataContext in xaml:

        <viewModels:DesignTimeMainPageViewModel />

All bindings work fine in design time, except binding to static CollectionViewSource:

            d:DesignSource="{Binding BalanceList}"
            Source="{Binding BalanceList}" />
<ListView ItemsSource="{Binding Source={StaticResource Balance}}" />

To display data in ListView that binded through CollectionViewSource in design time I've moved CollectionViewSource instance to ViewModel layer.

    private CollectionViewSource balance;
    public ICollectionView Balance
                if (balance == null)
                    balance = new CollectionViewSource();
                    balance.IsSourceGrouped = true;
                    balance.ItemsPath = new Windows.UI.Xaml.PropertyPath("Accounts");
                    Binding binding = new Binding();
                    binding.Source = BalanceList;

                    BindingOperations.SetBinding(balance, CollectionViewSource.SourceProperty, binding);

                return balance.View;


Every time when I reset BalanceList source collection, I call OnPropertyChanged("Balance"); to update binding.