GetService in non ViewModel class

Topics: Questions
Mar 26, 2013 at 1:42 PM

Have a static class Bootstrapper where I want to do Initialization. For example Register Services.
And also Register Views in the IUIVisualizerService
uiVisualizerService = GetService<IUIVisualizerService>();
uiVisualizerService.Register(typeof(MessageViewModel), typeof(MessageWindow));
But how to access the method GetService in class which is not derived from ViewModelbase.
Mar 26, 2013 at 2:09 PM
Ok. Found it:
var uiVisualizerService = ServiceLocator.Default.ResolveType<IUIVisualizerService>();