using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Ioc; using Microsoft.Practices.ServiceLocation; using Tango.MachineStudio.DB.ViewModels; namespace Tango.MachineStudio.DB { /// /// This class contains static references to all the view models in the /// application and provides an entry point for the bindings. /// public static class ViewModelLocator { /// /// Initializes a new instance of the ViewModelLocator class. /// static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); } public static MainViewVM MainViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static MachinesViewVM MachinesViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static OrganizationsViewVM OrganizationsViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static AddressesViewVM AddressesViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static UsersViewVM UsersViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static RolesViewVM RolesViewVM { get { return ServiceLocator.Current.GetInstance(); } } } }