-
Notifications
You must be signed in to change notification settings - Fork 16
/
App.cs
36 lines (31 loc) · 1.01 KB
/
App.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Flowers.ViewModel;
using GalaSoft.MvvmLight.Ioc;
using GalaSoft.MvvmLight.Views;
namespace Flowers
{
public static class App
{
private static ViewModelLocator _locator;
public static ViewModelLocator Locator
{
get
{
if (_locator == null)
{
// First time initialization
var nav = new NavigationService();
nav.Configure(
ViewModelLocator.DetailsPageKey,
typeof(DetailsActivity));
nav.Configure(
ViewModelLocator.AddCommentPageKey,
typeof(AddCommentActivity));
SimpleIoc.Default.Register<INavigationService>(() => nav);
SimpleIoc.Default.Register<IDialogService, DialogService>();
_locator = new ViewModelLocator();
}
return _locator;
}
}
}
}