General Notes
Note that all Prism applications using Unity will need to uninstall Unity due to a change from depending on Unity nuget to Unity.Container. This change reduces the number of Unity assemblies being referenced by 75% and removes an obscure secondary reference to CommonServiceLocator for WPF applications.
Prism 7.1 is NOT compatible with the Xamarin Forms WPF backend.
Prism.Core
- #1348: Navigation Alignment - moved all navigation interfaces into Prism Core (currently hidden from WPF)
Prism.Forms
- #1348: Navigation alignment
- Added INavigationParameters
- Added INavigationParametersInternal
- Added INavigationResult
- Convert all methods using
NavigationParameters
to use the newINavigationParameters
BREAKING - Changed
Task INavigationService.NavigateAsync
toTask<INavigationResult> INavigationService.NavigateAsync
- Changed
Task<bool> INavigationService.GoBackAsync
toTask<INavigationResult> INavigationService.GoBackAsync
BREAKING
- #1347: ContainerProvider - Allows Declaring Types in XAML that require the Container to Resolve them
- #1353: NavigationFrom not called when navigate to different Hamburger Menu Page
- #1354: INavigationAware methods are not called on children of a CarouselPage
- #1414: BREAKING Changed from Unity NuGet to Unity.Container
ContainerProvider
The Container Provider now allows types like ValueConverters to include Dependency Injection of Types/Services in the ctor, and allows the converter to be declared in XAML
namespace Contoso.Converters
{
public class MyValueConverter : IValueConverter
{
private ILoggerFacade _logger { get; }
public MyValueConverter(ILoggerFacade logger)
{
_logger = logger;
}
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
_logger.Log("Converting value", Category.Debug, Priority.None);
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
_logger.Log("Converting Value Back...", Category.Debug, Priority.None);
return value;
}
}
}
This can then be used in XAML using the ContainerProvider as follows:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ioc="clr-namespace:Prism.Ioc;assembly=Prism.Forms"
xmlns:converters="using:Contoso.Converters"
x:Class="Contoso.Views.ViewA">
<ContentPage.Resources>
<ResourceDictionary>
<ioc:ContainerProvider x:TypeArguments="converters:MyValueConverter" x:Key="myValueConverter" />
</ResourceDictionary>
</ContentPage.Resources>
<Entry Text="{Binding Demo,Converter={StaticResource myValueConverter}}" />
</ContentPage>
Prism.WPF
- #30: Removing from, or opting out of registration, in the IRegionNavigationJournal
- #993: RemoveAll throws if KeepAlive is false
- #1013: MEF DirectoryModuleCatalog - problem with diacritics since 6.3
- #1120: Prism.Autofac RegisterTypeForNavigation issue
- #1128: ViewModelLocator triggers in design mode
- #1161: Ninject - Prism creating new view even if view exists in region
- #1165: Change PopupWindowAction.CreateDefaultWindow to virtual
- #1175: Upgraded to Unity 5 Breaking
- #1211: Upgrade to CommonServiceLocator 2.0.1 Breaking
- #1217: Add OnInitialized methdo to bootstrapper
- #1242: AssemblyResolver - File path in FileNotFoundException
- #1261: ListDictionary TKey and TValue same type Breaking
- #1264: Is it possible to provide a type safe way to read parameter
- #1321: Added support for regions targeting FrameworkContentElements
- #1327: Include correct version of System.Windows.Interactivity
- #1414: BREAKING Changed from Unity NuGet to Unity.Container
New PrismApplication Base Class
The Bootstrapper has been marked obsolete and it is recommended to use the PrimsApplication class going forward. This results in less code to get started, and an easier and more intuitive API.
Added new Prism.Ioc namespace to handle DI container abstractions. Interacting with the container is now done via the IContainerProvider
and the IContainerRegistry
interfaces. The IContainerProvider
interface is used to resolve services from the container. The IContainerRegistry
is used to register types with the container. Access to the actual DI container can be achieved by using the GetContainer()
extension method off of the IContainerRegistry
and IContainerProvider
interfaces.