aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-26 16:31:42 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-26 16:31:42 +0200
commit121311b4accdca68e2d10360e255f513916b205e (patch)
tree0a1cb0d41f3bcf9bd5fabab8f3c60c36ec5d0d19 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
parent76fd65594e3c7434be615036ea569a1f8907a648 (diff)
downloadTango-121311b4accdca68e2d10360e255f513916b205e.tar.gz
Tango-121311b4accdca68e2d10360e255f513916b205e.zip
Working on Hardware Designer Module.
Added Installer Project Installer.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
new file mode 100644
index 000000000..0f770c798
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs
@@ -0,0 +1,33 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Ioc;
+using Microsoft.Practices.ServiceLocation;
+using Tango.MachineStudio.HardwareDesigner.ViewModels;
+using Tango.MachineStudio.HardwareDesigner.Views;
+
+namespace Tango.MachineStudio.HardwareDesigner
+{
+ /// <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<MainViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MainViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file