/// <summary> /// Registers an object for navigation. /// </summary> /// <typeparam name="T">The Type of the object to register as the view</typeparam> /// <param name="container"></param> /// <param name="name">The unique name to register with the object.</param> public static DependencyInjectionContainer RegisterTypeForNavigation <T>(this DependencyInjectionContainer container, string name = null) { Type type = typeof(T); string viewName = string.IsNullOrWhiteSpace(name) ? type.Name : name; return(container.ConfigureTypeForNavigation(type, viewName)); }
private static DependencyInjectionContainer ConfigureTypeForNavigationWithViewModel <TViewModel>(this DependencyInjectionContainer container, Type viewType, string name) { if (string.IsNullOrWhiteSpace(name)) { name = viewType.Name; } ViewModelLocationProvider.Register(viewType.ToString(), typeof(TViewModel)); return(container.ConfigureTypeForNavigation(viewType, name)); }