Created
June 8, 2016 00:46
-
-
Save rohits79/3cec96ea5860901f3d46b3268ab20731 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Configures the default region adapter mappings to use in the application, in order | |
/// to adapt UI controls defined in XAML to use a region and register it automatically. | |
/// May be overwritten in a derived class to add specific mappings required by the application. | |
/// </summary> | |
/// <returns>The <see cref="RegionAdapterMappings"/> instance containing all the mappings.</returns> | |
protected virtual RegionAdapterMappings ConfigureRegionAdapterMappings() | |
{ | |
RegionAdapterMappings regionAdapterMappings = ServiceLocator.Current.GetInstance<RegionAdapterMappings>(); | |
if (regionAdapterMappings != null) | |
{ | |
regionAdapterMappings.RegisterMapping(typeof(Selector), ServiceLocator.Current.GetInstance<SelectorRegionAdapter>()); | |
regionAdapterMappings.RegisterMapping(typeof(ItemsControl), ServiceLocator.Current.GetInstance<ItemsControlRegionAdapter>()); | |
regionAdapterMappings.RegisterMapping(typeof(ContentControl), ServiceLocator.Current.GetInstance<ContentControlRegionAdapter>()); | |
} | |
return regionAdapterMappings; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment