aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/ProjectItems
Path not found
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Practices.ServiceLocation;
using Tango.MachineStudio.Developer.Navigation;
using Tango.MachineStudio.Developer.ViewModels;
using Tango.MachineStudio.Developer.Views;

namespace Tango.MachineStudio.Developer
{
    /// <summary>
    /// This class contains static references to all the view models in the
    /// application and provides an entry point for the bindings.
    /// </summary>
    public static class ViewModelLocator
    {
        /// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        static ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            SimpleIoc.Default.Register<IMainView>(() => MainView.Instance);
            SimpleIoc.Default.Register<MainViewVM>();
            SimpleIoc.Default.Register<DeveloperNavigationManager, DeveloperNavigationManager>();
        }

        public static MainViewVM MainViewVM
        {
            get
            {
                return ServiceLocator.Current.GetInstance<MainViewVM>();
            }
        }
    }
}