using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Ioc; using Microsoft.Practices.ServiceLocation; using Tango.MachineStudio.Logging.Navigation; using Tango.MachineStudio.Logging.ViewModels; namespace Tango.MachineStudio.Logging { /// /// 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.Unregister(); SimpleIoc.Default.Register(() => new LoggingNavigationManager()); } public static EventsViewVM EventsViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static ApplicationLogsViewVM ApplicationLogsViewVM { get { return ServiceLocator.Current.GetInstance(); } } public static HomeViewVM HomeViewVM { get { return ServiceLocator.Current.GetInstance(); } } } }