/// <inheritDoc /> protected override void ConfigureViewModelLocator() { ViewModelLocationProvider.SetDefaultViewModelFactory((view, type) => { IParameter[] overrides = null; var page = view as Page; if (page != null) { var navService = new PageNavigationService(); ((IPageAware)navService).Page = page; overrides = new IParameter[] { new ConstructorArgument( "navigationService", navService ) }; } return Kernel.Get(type, overrides); }); }
protected override void ConfigureViewModelLocator() { ViewModelLocationProvider.SetDefaultViewModelFactory((view, type) => { ParameterOverrides overrides = null; var page = view as Page; if (page != null) { var navService = new PageNavigationService(); ((IPageAware)navService).Page = page; overrides = new ParameterOverrides { { "navigationService", navService } }; } return Container.Resolve(type, overrides); }); }