Skip to content

Instantly share code, notes, and snippets.

View twolfprogrammer's full-sized avatar

Thomas Wolf twolfprogrammer

View GitHub Profile
@twolfprogrammer
twolfprogrammer / Locator.cs
Last active July 22, 2016 16:18
MVVM Light & Xamarin.Forms: Locator
public class Locator {
public const string HomePage = "HomePage";
public const string SecondPage = "SecondPage";
static Locator() {
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
var navigation = new NavigationService();
navigation.Configure(Locator.HomePage, typeof(HomePage));
navigation.Configure(Locator.SecondPage, typeof(SecondPage));
SimpleIoc.Default.Register<HomePageViewModel>();