Skip to content

Commit

Permalink
added RegisterViewWithRegion generic method
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlagunas committed Mar 4, 2020
1 parent e122c45 commit e833665
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/Wpf/Prism.Wpf/Regions/RegionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,19 @@ public IRegionManager AddToRegion(string regionName, object view)
return Regions[regionName].Add(view);
}

/// <summary>
/// Associate a view with a region, by registering a type. When the region get's displayed
/// this type will be resolved using the ServiceLocator into a concrete instance. The instance
/// will be added to the Views collection of the region
/// </summary>
/// <param name="regionName">The name of the region to associate the view with.</param>
/// <typeparam name="T">The type of the view to register</typeparam>
/// <returns>The regionmanager, for adding several views easily</returns>
public IRegionManager RegisterViewWithRegion<T>(string regionName)
{
return RegisterViewWithRegion(regionName, typeof(T));
}

/// <summary>
/// Associate a view with a region, by registering a type. When the region get's displayed
/// this type will be resolved using the ServiceLocator into a concrete instance. The instance
Expand Down

0 comments on commit e833665

Please sign in to comment.