The design view does not support connections to your database, so if your view model constructors load any data from the database, then this will throw an exception when switching to the design view. Therefore, your user interface elements will not load properly.
Instead, you will need to load dummy data if you are in development mode. You can programmatically check whether you are in development mode using the MVVM-Light Toolkit ViewModelBase.IsInDesignModeStatic property.
For instance:
ViewModelConstructor() { if (ViewModelBase.IsInDesignModeStatic) { // load dummy data } else { // load real data from database } }
source share