MVVM / WPF

Start with MVVM Light Toolkit

MVVM Light toolkit is a lightweight toolkit for MVVM.  This toolkit provides very basic classes for developing your application in MVVM architecture.

You can download the latest MVVM Light Toolkit from here.

MVVM Light Toolkit comes with 2 main DLLs.

  1. GalaSoft.MvvmLight.dll
  2. GalaSoft.MvvmLight.Extras.dll

Main classes in GalaSoft.MvvmLight.dll are:

  1. ObservableObject – Base class for Model classes. It creates Model properties as observable.
  2. ViewModelBase – Base class for ViewModel classes.
  3. RelayCommand – A command. More about commands here.
  4. WeakAction – Stores an System.Action without causing a hard reference to be created to the Action’s owner. The owner can be garbage collected at any time.
  5. WeakFunc – Stores an Func without causing a hard reference to be created to the Func’s owner. The owner can be garbage collected at any time.
  6. Messenger – Class for allowing objects to exchange messages.
  7. MessageBase – Base class for all messages broadcasted by the Messenger.
  8. DispatcherHelper – Helper class for dispatcher operations on the UI thread.

Main classes in GalaSoft.MvvmLight.Extra.dll are:

  1. EventToCommand – Used for bind any event of FrameworkElement to ICommand.
  2. SimpleIOC – An IOC container for register and resolve instances.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.