1
votes

I bag your pardon. I'm very beginner in MVVM. I installed MVVM Light Toolkit V 4.0 and tryed to create a WPF MVVM application project with it. A project was created successfully. There are following folders in the project: "Design", "Model", "Skins" and "ViewModel". I clearly understand the necessity of "Model" and "ViewModel" folders. But what is the purpose of "Design" and "Skins" folders? A folder "Design" contains a file DesignDataService.cs with the following contents:

using System;
using MvvmLight1.Model;

namespace MvvmLight1.Design
{
    public class DesignDataService : IDataService
    {
        public void GetData(Action<DataItem, Exception> callback)
        {
            // Use this to create design time data

            var item = new DataItem("Welcome to MVVM Light [design]");
            callback(item, null);
        }
    }
}

The folder Skins contains a file MainSkin.xaml with the following contents:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

</ResourceDictionary>

Explain me please: what is the purpose of "Design" folder (and it's contents) and "Skins" folder (and it's contents) in MVVM WPF application? And where should I place xaml-file that represents the View in MVVM-application?

2

2 Answers

1
votes

Design Folder provides Design-Time data. Data that helps you design your UI in VS or expression-blend with dummy data that will not be applied to your project at run-time.

Skins is just a collection of resources in your project. Style's, ControlTemplates and such can go into that folder.

MVVM-light at codeplex have a look through the 2 videos in that page where the author of the library shows how to use Design time data.

0
votes

The WPF designer in Visual Studio or in Blend is able to run the application during the design time - In this context, design teams means actually during that time you design the GUI of your application. Most of the application designs work only if the design is filled with data, but it makes not sense to call a database or somethings else. In conclusion the folder design contains all class which provide the data for the design time. This behaviour if often called blendability, because of the tool Blend. This links might help for further information:

http://www.robfe.com/2009/08/design-time-data-in-expression-blend-3/

http://www.robfe.com/2009/12/design-time-data-in-expression-blend-3-revisited/

The folder skins normally contains custom designs for your WPF controls. For more information, this url might help: http://www.c-sharpcorner.com/uploadfile/raj1979/skins-in-wpf/