Source

MadProps.MvvmLight / ActivitySample / App.xaml.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace ActivitySample
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            // this line is necessary because the DispatcherHelper needs to be initialized on the UI thread!
            GalaSoft.MvvmLight.Threading.DispatcherHelper.Initialize();
        }
    }
}