Pre-release

@dansiegel dansiegel released this Sep 20, 2018

Assets 25

General

This release introduces the final API alignment for Prism.Modularity. This undoes some breaking changes made in Preview 3 to make the upgrade path easier for WPF apps that declare ModuleCatalogs in XAML. This also introduces support for Partial Views for Xamarin Forms.

Prism.Core

  • #1348: Navigation Alignment - moved all navigation interfaces into Prism Core (currently hidden from WPF)
  • #1476: Module Alignment - moved Exceptions, ModuleInfo, and several Modularity interfaces to Prism.Core from WPF combining with some Prism.Forms definitions.
    • IModuleManager.ModuleDownloadProgressChanged (available in net45 aka WPF ONLY)
  • #1505: Memory problem with EventAggregator and never published message
  • #1509: Module Alignment Updates: Introduce IModuleInfo
  • #1511: Module Alignment
    • All modularity interfaces and base & supporting types moved to Prism.Core

Prism.Forms

  • #1348: Navigation alignment
    • Added INavigationParameters
    • Added INavigationParametersInternal
    • Added INavigationResult
    • Convert all methods using NavigationParameters to use the new INavigationParameters BREAKING
    • Changed Task INavigationService.NavigateAsync to Task<INavigationResult> INavigationService.NavigateAsync
    • Changed Task<bool> INavigationService.GoBackAsync to Task<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
  • #1403: Remove pages from NavigationStack without pushing another one
  • #1414: Changed from Unity NuGet to Unity.Container BREAKING
  • #1425: XAML Navigation
  • #1439: DependencyResolver
  • #1456: Relative back navigation does not work with INavigationParameters
  • #1463: DryIoc Default Rules Change. By default DryIoc will attempt to resolve types based on an available constructor with resolvable types. Secondary registrations will now replace any initial registration by default.
  • #1464: Unity and Autofac no longer require INavigationService to be named navigationService inside of a ViewModel.
  • #1469: Make Xamarin.Forms DependencyResolver Opt-In
  • #1476: Module Alignment BREAKING
    • ModuleInfo.ModuleType has changed from System.Type to System.String and is equal to Type.AssemblyQualifiedName
    • IModuleManager.LoadModuleCompleted - Forms will now invoke this event when a new module has been loaded. Note there is not currently a default handler provided by PrismApplication. This event will contain any caught exception that was thrown while attempting to load a Module.
    • Moved all Modularity interfaces except IModuleCatalog to Prism.Core
  • #1509: Module Alignment
    • Adds IModuleInfo
    • ModuleInfo moved back to Prism.Forms. ModuleInfo will now return Module Dependencies when decorated with the ModuleDependencyAttribute if dependencies are not set at Registration.
  • #1511: Module Alignment - All modularity interfaces and base & supporting types moved to Prism.Core
  • #1519: Support Partial Views in Xamarin Forms
  • #1546: MasterDetailPage navigation on iOS is unexcepted
  • #1549: EventToCommandBehavior.OnEventRaised NullReferenceException

Partial Views

The concept of a Partial View is to support a custom layout which may be reused across multiple pages, and eliminate ViewModel logic duplication by allowing that custom layout to rely on its own ViewModel. To use a Partial View you must set the ViewModelLocator.AutowirePartialView property with a reference to the containing page as shown here. You should not set the ViewModelLocator.AutowireViewModel property on the Partial View unless you are explicitly opting out as setting this property to true directly may result in the ViewModel being incorrectly set.

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:AwesomeApp.Views"
             xmlns:prism="clr-namespace:Prism.Ioc;assembly=Prism.Forms"
             xmlns:mvvm="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
             x:Name="self"
             x:Class="AwesomeApp.Views.ViewA">
  <StackLayout>
    <local:AwesomeView mvvm:ViewModelLocator.AutowirePartialView="{x:Reference self}" />
    <Entry Text="{Binding SomeValue" />
  </StackLayout>
</ContentPage>

Dependency Resolver

Xamarin.Forms 3.1 introduces a new DependencyResolver. This enables applications using Dependency Injection to use their Container to resolve Platform Renderers and Effects which makes it possible to inject any services such as a logger. Since the default constructor was deprecated in Android Renderers as of Xamarin.Forms 2.5, Prism now includes a specific Android binary that enables the DependencyResolver to resolve types using

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>

Navigation Improvements

**Implemented relative back behavior ("../../") **

Previously, when using the relative back feature ("../" ) you would be required to provide a page that would be pushed onto the navigation stack. That is no longer required. You may now chain together any number of relative go-back instructions to "go back".

For example:
Given your navigation stack looked like this: NavigationPage/UserList/UserDetails/LoginPage/EditUser

You can now indicate how many pages to remove, or "go back" by chaining the relative go-back instruction "../".

NavigationService.NavigateAsync("../../../");

This would result in going back three pages leaving you with the following navigation stack:

NavigationPage/UserList

NOTE - The pages in the stack prior to the current page (last page in the nav stack) will be removed without calling any INavAware methods. Only the current page (EditUser in this example) would perform a proper GoBackAsync and execute the INavAware methods.

NOTE - This feature is only supported while within the context of a NavigationPage.

XAML Navigation

You can now use XAML Navigation Extensions to Navigate. This works well for scenarios where you may have a partial "MenuView" that may be reused across multiple Pages or where there may be no real reason to implement Navigation inside of a ViewModel.

<!-- basic nav -->
<Button Text="Go To About" Command"{prism:NavigateTo 'About'}" />

<!-- basic nav without animation-->
<Button Text="Go To About" Command"{prism:NavigateTo 'About', Animated=False}" />

<!-- basic modal nav -->
<Button Text="Go To About" Command"{prism:NavigateTo 'About', UseModalNavigation=True}" />

<!-- custom can navigate support -->
<Button Text="Go To About" Command="{prism:NavigateTo 'About'}" prism:Navigation.CanNavigate="{Binding CanNavigate}" />

<!-- go to new page, but remove one along the way -->
<Button Text="Go To Settings" Command"{prism:NavigateTo '../Settings'}" />

<!-- nav with VM Parameters -->
<Button Text="Go To About" 
        Command"{prism:NavigateTo 'About'}" 
        CommandParameters="{Binding MyNavParams}" />

<!-- Go Back -->
<Button Text="Go Back" Command="{prism:GoBack}" />

<!-- Go Back To Root -->
<Button Text="Go Back To Root" Command="{prism:GoBack ToRoot}" />

<!-- Xaml defined parameters -->
<Button Text="Go To About" Command="{prism:NavigateTo 'About'}" >
    <Button.CommandParameter>
        <prism:XamlNavigationParameters Parent="{x:Reference this}">
            <prism:XamlNavigationParameter Key="MainPageViewModel" Value="{Binding .}" />
        </prism:XamlNavigationParameters>
    </Button.CommandParameter>
</Button>

<!-- can navigate on a parent object-->
<ContentView>
    <ContentView prism:Navigation.CanNavigate="False">
        <ContentView>
            <Button Text="Cannot Navigate" Command="{prism:GoBack}" /> 
        </ContentView>
    </ContentView>
</ContentView>

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
  • #1463: DryIoc Default Rules Change. By default DryIoc will attempt to resolve types based on an available constructor with resolvable types. Secondary registrations will now replace any initial registration by default.
  • #1476: Module Alignment BREAKING
    • Moved Exceptions to Prism.Core
    • Moved ModuleInfo to Prism.Core (see #1509)
    • Moved IModuleCatalogItem to Prism.Core
    • Moved IModuleInitializer to Prism.Core
    • Moved IModuleManager to Prism.Core
  • #1479: Fixes issue that prevented Prism.Autofac apps from starting
  • #1493: Fixes issue that prevented Prism.Ninject apps from starting
  • #1504: Memory problem with EventAggregator and never published message
  • #1509: Module Alignment
    • Introduced new IModuleInterface and moved concrete implementations back to the Platform level. This fixes a break that would affect any ModuleCatalogs defined in XAML caused by changing the resolving assembly in the XML Namespace.
  • #1511: Module Alignment
    • All modularity interfaces and base & supporting types moved to Prism.Core
  • #1543: Calling ToString() on NavigationParameters causes NullReferenceException when parameter is null.

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.

Note: The Bootstrapper class is not being removed, it is only marked obsolete to drive awareness of the new PrismApplication class.

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.

Pre-release
Pre-release

@dansiegel dansiegel released this Jun 15, 2018 · 56 commits to master since this release

Assets 25

General

Prism now has support for SourceLink. This adds metadata that allow Visual Studio to determine the exact commit that was built and pull the source from GitHub from that commit, thus allowing you to step directly into Prism's code while debugging.

Trust is important, and we believe you should be able to trust that the NuGet Packages we ship are authentic and have not been tampered with. As such all Prism NuGet packages are now signed by our EV Certificate providing you the ability to see very clearly that the package is authentically from the Prism team.

Prism.Core

  • #1348: Navigation Alignment - moved all navigation interfaces into Prism Core (currently hidden from WPF)
  • #1476: Module Alignment - moved Exceptions, ModuleInfo, and several Modularity interfaces to Prism.Core from WPF combining with some Prism.Forms definitions.
    • IModuleManager.ModuleDownloadProgressChanged (available in net45 aka WPF ONLY)

Prism.Forms

  • #1348: Navigation alignment
    • Added INavigationParameters
    • Added INavigationParametersInternal
    • Added INavigationResult
    • Convert all methods using NavigationParameters to use the new INavigationParameters BREAKING
    • Changed Task INavigationService.NavigateAsync to Task<INavigationResult> INavigationService.NavigateAsync
    • Changed Task<bool> INavigationService.GoBackAsync to Task<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
  • #1403: Remove pages from NavigationStack without pushing another one
  • #1414: Changed from Unity NuGet to Unity.Container BREAKING
  • #1425: XAML Navigation
  • #1439: DependencyResolver
  • #1456: Relative back navigation does not work with INavigationParameters
  • #1463: DryIoc Default Rules Change. By default DryIoc will attempt to resolve types based on an available constructor with resolvable types. Secondary registrations will now replace any initial registration by default.
  • #1464: Unity and Autofac no longer require INavigationService to be named navigationService inside of a ViewModel.
  • #1469: Make Xamarin.Forms DependencyResolver Opt-In
  • #1476: Module Alignment BREAKING
    • ModuleInfo.ModuleType has changed from System.Type to System.String and is equal to Type.AssemblyQualifiedName
    • IModuleManager.LoadModuleCompleted - Forms will now invoke this event when a new module has been loaded. Note there is not currently a default handler provided by PrismApplication. This event will contain any caught exception that was thrown while attempting to load a Module.
    • Moved all Modularity interfaces except IModuleCatalog to Prism.Core

Dependency Resolver

Xamarin.Forms 3.1 introduces a new DependencyResolver. This enables applications using Dependency Injection to use their Container to resolve Platform Renderers and Effects which makes it possible to inject any services such as a logger. Since the default constructor was deprecated in Android Renderers as of Xamarin.Forms 2.5, Prism now includes a specific Android binary that enables the DependencyResolver to resolve types using

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>

Navigation Improvements

**Implemented relative back behavior ("../../") **

Previously, when using the relative back feature ("../" ) you would be required to provide a page that would be pushed onto the navigation stack. That is no longer required. You may now chain together any number of relative go-back instructions to "go back".

For example:
Given your navigation stack looked like this: NavigationPage/UserList/UserDetails/LoginPage/EditUser

You can now indicate how many pages to remove, or "go back" by chaining the relative go-back instruction "../".

NavigationService.NavigateAsync("../../../");

This would result in going back three pages leaving you with the following navigation stack:

NavigationPage/UserList

NOTE - The pages in the stack prior to the current page (last page in the nav stack) will be removed without calling any INavAware methods. Only the current page (EditUser in this example) would perform a proper GoBackAsync and execute the INavAware methods.

NOTE - This feature is only supported while within the context of a NavigationPage.

XAML Navigation

You can now use XAML Navigation Extensions to Navigate. This works well for scenarios where you may have a partial "MenuView" that may be reused across multiple Pages or where there may be no real reason to implement Navigation inside of a ViewModel.

<!-- basic nav -->
<Button Text="Go To About" Command"{prism:NavigateTo 'About'}" />

<!-- basic nav without animation-->
<Button Text="Go To About" Command"{prism:NavigateTo 'About', Animated=False}" />

<!-- basic modal nav -->
<Button Text="Go To About" Command"{prism:NavigateTo 'About', UseModalNavigation=True}" />

<!-- custom can navigate support -->
<Button Text="Go To About" Command="{prism:NavigateTo 'About'}" prism:Navigation.CanNavigate="{Binding CanNavigate}" />

<!-- go to new page, but remove one along the way -->
<Button Text="Go To Settings" Command"{prism:NavigateTo '../Settings'}" />

<!-- nav with VM Parameters -->
<Button Text="Go To About" 
        Command"{prism:NavigateTo 'About'}" 
        CommandParameters="{Binding MyNavParams}" />

<!-- Go Back -->
<Button Text="Go Back" Command="{prism:GoBack}" />

<!-- Go Back To Root -->
<Button Text="Go Back To Root" Command="{prism:GoBack ToRoot}" />

<!-- Xaml defined parameters -->
<Button Text="Go To About" Command="{prism:NavigateTo 'About'}" >
    <Button.CommandParameter>
        <prism:XamlNavigationParameters Parent="{x:Reference this}">
            <prism:XamlNavigationParameter Key="MainPageViewModel" Value="{Binding .}" />
        </prism:XamlNavigationParameters>
    </Button.CommandParameter>
</Button>

<!-- can navigate on a parent object-->
<ContentView>
    <ContentView prism:Navigation.CanNavigate="False">
        <ContentView>
            <Button Text="Cannot Navigate" Command="{prism:GoBack}" /> 
        </ContentView>
    </ContentView>
</ContentView>

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
  • #1463: DryIoc Default Rules Change. By default DryIoc will attempt to resolve types based on an available constructor with resolvable types. Secondary registrations will now replace any initial registration by default.
  • #1476: Module Alignment BREAKING
    • Moved Exceptions to Prism.Core
    • Moved ModuleInfo to Prism.Core
    • Moved IModuleCatalogItem to Prism.Core
    • Moved IModuleInitializer to Prism.Core
    • Moved IModuleManager to Prism.Core

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.

Pre-release
Pre-release

@dansiegel dansiegel released this Apr 2, 2018 · 110 commits to master since this release

Assets 19

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 new INavigationParameters BREAKING
    • Changed Task INavigationService.NavigateAsync to Task<INavigationResult> INavigationService.NavigateAsync
    • Changed Task<bool> INavigationService.GoBackAsync to Task<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.

@dansiegel dansiegel released this Jan 22, 2018 · 152 commits to master since this release

Assets 13

For apps that have not upgraded from 6.X to 7.0, please be sure to read the initial 7.0 release notes for a complete listing of changes.

This will break users who have existing implementations of IModule. Note that Initialize has been completely removed. All Initialization logic should be moved to OnInitialized. Any services that need to be resolved can now be resolved using IContainerProvider in OnInitialized.

  • #1308: Updates BindableBase to use EqualityComparer in SetProperty
  • #1333: Select tabs when navigating from a MasterDetailPage and reusing the TabbedPage
  • #1338: BREAKING CHANGE Changes IModule.OnInitialized() => IModule.OnInitialized(IContainerProvider)
  • #1342: BREAKING CHANGE Removes IModule.Initialize

@dansiegel dansiegel released this Jan 12, 2018 · 178 commits to master since this release

Assets 13

General Notes

Before upgrading from Prism 6.3, please be sure to read through the release notes as there are several major and breaking changes. This release is only for Prism Core and Prism for Xamarin Forms ONLY.

Ninject Support

Ninject has been removed as a supported DI Container for Prism Forms due to compatibility issues with Ninject on iOS and Android.

Prism Core

  • .NET Standard Support

  • Added method to clear all errors on ErrorsContainer

  • Removed requirement for parameter in delegate definition of DelegateCommand.ObservesCanExecute Breaking
    Example:
    Old (v6.3): ObservesCanExcute((**vm**) => Property)
    New (v7.0): ObservesCanExecute(() => Property)

  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types
    Example:
    ObservesProperty(() => Property.NestedProperty.NestedPoperty)

Prism Forms

  • #650: Navigating between Tabs Breaking

  • #683: .NET Standard support

  • #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android

  • #921: Add ability to Remove pages from the navigation stack

  • #946: Support designating useModalNavigation for specific segments in Uri navigation

  • #1007: Re-license to MIT, following the Microsoft led projects

  • #1008: NavigationParameters: Not possible to specify parent type as generic parameter T

  • #1109: Retrieve current URI from Prism Xamarin.Forms NavigationService

  • #1111: Include pdb file in nuget package

  • #1024: XF: NavigationService swallowing Exceptions

  • #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property. The following changes were made to accommodate these changes:
    IDeviceService

  • deprecated OnPlatform methods

  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string

  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

  • #1027: Support macOS

  • #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible

  • #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called

  • #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation

  • #1054: When deep linking within NavigationPage, page order is reversed

  • #1063: Master of MasterDetailPage will not be destroyed

  • #1074: Optimize Xamarin Forms DryIoc adapter performance

  • #1085: Error occurs if null path is specified in EventToCommandBehavior

  • #1089: DebugLogger does not work in nuget-package

  • #1099: Introduce a Behavior factory into the navigation service

  • #1132: Prism Forms Modularity extension methods

  • #1133: IModuleCatalog AddModule returns wrong type

  • #1139: Modularity Enhancements

  • #1175: Upgraded to Unity 5 Breaking

  • #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

  • #1166: Custom NavigationPage is not working properly Prism 7

  • #1187: Change TabbedPage navigation behavior Breaking

  • #1198: Rename IApplicationLifecycle to IApplicationLifecycleAware Breaking

  • #1200: Add GoBackToRoot method

  • #1232: PageNavigationService should check for MultiPage Parent

  • #1225: OnNavigatedTo Contains Extra Parameter

  • #1254: remove support for DependenyService autoresolution Breaking

  • #1286: Adding modules to Prism in newest PR version

  • #1325: Removes support for Ninject due to container incompatibility with iOS and Android

  • added IPageLifecycleAware and PageLifecycleAwareBehavior to enable responding to the Page's Appearing and Disappearing events

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterForNavigationOnPlatform<MainPage, MainPageViewModel>("Main", 
	new Platform<MainPage_Android>(RuntimePlatform.Android),
	new Platform<MainPage_iOS>(RuntimePlatform.iOS));

PrismApplication API Changes - BREAKING

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.

Notable changes:

  • Removed ModuleCatalog property
  • Changed signature of ConfigureModuleCatalog() to ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
  • Changed signature of RegisterTypes() to RegisterTypes(IContainerRegistry containterRegistry)
  • Removed CreateContainer() method
  • Removed CreateNavigationService() method
  • Removed CreateLogger() method
  • Removed CreateModuleManager() method
  • Removed CreateModuleCatalog() method
  • Changed order of application initialization process (platform specific types are registered before application types)
  • Container property is now of type IContainerProvider
  • Renamed ConfigureContainer to RegisterRequiredTypes(IContainerRegistry containterRegistry)
  • Renamed RegisterTypeForNavigation to RegisterForNavigation

IModule API Changes - BREAKING

  • Obsolete Initialize() method - move all existing code into RegisterTypes and OnInitialized methods
  • Added RegisterTypes(IContainerRegistry containerRegistry) method - used to register types with the container
  • Added OnInitialized() method - used to perform any action after the module has been created, and types have been registered with the container.

ModuleInfo API Changes - BREAKING

  • Removed defaut ctor
  • Changed order of ctor parameters from ModuleInfo(Name, ModuleType, Mode) to ModuleInfo(ModuleType, Name, Mode)

TabbedPage Navigation Behavior Change - BREAKING

Current Behavior (v6.3.0)

NavigateAsync("TabbedPage/ViewA/ViewB") will select the tab ViewA in the TabbedPage if it exists, then continue navigating. If ViewA does not exist as a tab, then you will continue to navigate as expected.

NavigateAsync("TabbedPage/NavigationPage/ViewA/ViewB") would search the TabbedPage for the first instance of a tab that was a NavigationPage, then navigate within the Navigation page the remaining ViewA and ViewB pages. This provided the ability to deep link into a tab's nested navigation page, but there was no way to opt-out of this behavior.

Also, the INavigationAware methods did not get called to all tabs meaning that you would be responsible for forwarding any parameters to all your tabs.

New Behavior

NavigateAsync("TabbedPage/ViewA/ViewB") will no longer select any tabs, but rather continue processing the navigation as separate pages on the navigation stack.

If you wish to select a tab, you will now use a parameter called "selectedTab" to indicate which tab you would like to select.

NavigateAsync("TabbedPage?selectedTab=MiddleTab/ViewA/ViewB")

This will navigate to the TabbedPage, selected the "MiddleTab" and continue navigating ViewA and ViewB onto the navigation stack.

For tabs that are wrapped inside a NavigationPage, you do not need to change anything. The syntax is the same. This will search each tab to see if it is a navigation page and if the CurrentPage of the NavigationPage matches "MiddleTab", the tab will be selected. This is much more flexible than the existing behavior as before it would take the first instance of the NavigationPage found. Now you can choose which tab exactly.

There is a constant in the KnownNavigationParameters called SelectedTab that you can use instead of a string.

NavigateAsync($"TabbedPage?{KnownNavigationParameters.SelectedTab}=MiddleTab")

Some INavigationAware methods are now fired on all Tabs:

  • OnNavigatingTo will be invoked on the TabbedPage and ALL TABS.
  • OnNavigatedTo will be invoked on the TabbedPage and only the SELECTED TAB.
  • OnNavigatedFrom will be invoked on the TabbedPage and only the SELECTED TAB.

Note: the parameter key selectedTab is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Note: At this time there is no native support for deep linking into a Tab that is a navigation page. Please let me know if you need this functionality.

Dynamic Tab Generation

You can now dynamically create tabs when navigating to a TabbedPage by using the KnownNavigationParameters.CreateTab constant or by using the "createTab" parameter name.
_navigationService.NavigateAsync("MyTabbedPage?createTab=ViewA&createTab=ViewB");
This will create a TabbedPage and then create two tabs, ViewA and ViewB.
To create a tab that wraps a page in a NavigationPage, simply denote this as a nested hierarchy using the | character.
_navigationService.NavigateAsync("MyTabbedPage?createTab=NavigationPage|ViewA");

Remove pages from navigation stack

This feature allows you to remove pages form the navigation stack of a NavigationPage while at the same time navigating to a new page. For each page you wish to remove, prefix your navigation path with ../.

Example
Our app requires a user to login in order to edit "User" profile information. This will require the user to be prompted to login and then once successful continue to edit the profile. This leaves us with the following navigation stack:

"NavigationPage/UserList/UserDetails/LoginPage/EditUser"

If we were to hit the back button from the EditUser page, we would be returned to the LoginPage. This is not the desired experience. Instead, we want to go back to the UserDetails which was just updated. To achieve this we provide the following navigation URI from the LoginPage page with a successful login attempt.

NavigationService.NavigateAsync("../EditUser");

This would remove the LoginPage and then immediately navigate to the "EditUser" page which we now have access to.

You can chain the ../ instruction for each page that needs to be removed from the stack.

Given: "NavigationPage/ViewA/ViewB/ViewC/ViewD"
Navigate from ViewD with: NavigationService.NavigateAsync("../../../ViewE");
Results in: "NavigationPage/ViewA/ViewE"

Note: This only works when navigating within a NavigationPage! Modal pages are not supported.

UseModalNavigation in specific deep link segments

You can now control the various segments of a deep ink by setting the useModalNavigation parameter on any specific navigation segment in the URI.

NavigatAsync("NavigationPage/ViewA/ViewB/NavigationPage?useModalNavigation=true/ViewC/ViewD");

You can also use the built-in constant KnownNavigationParameters.UseModalNavigation

NavigatAsync($"NavigationPage/ViewA/ViewB/NavigationPage? {KnownNavigationParameters.UseModalNavigation} =true/ViewC/ViewD");

Note: the parameter key useModalNavigation is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Pre-release

@dansiegel dansiegel released this Dec 7, 2017 · 193 commits to master since this release

Assets 29

Special Notes

Major Changes included in this release:

  • Dependency Injection has been abstracted for WPF & Xamarin Forms providing a more consistent API across both platforms and DI Containers. BREAKING
  • WPF Bootstrapper has been Deprecated and a new PrismApplication class has been introduced

Prism.Core

  • .NET Standard Support

  • Added method to clear all errors on ErrorsContainer

  • Removed requirement for parameter in delegate definition of DelegateCommand.ObservesCanExecute Breaking
    Example:
    Old (v6.3): ObservesCanExcute((**vm**) => Property)
    New (v7.0): ObservesCanExecute(() => Property)

  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types
    Example:
    ObservesProperty(() => Property.NestedProperty.NestedPoperty)

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

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.

Prism.Forms

  • #650: Navigating between Tabs Breaking

  • #683: .NET Standard support

  • #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android

  • #921: Add ability to Remove pages from the navigation stack

  • #946: Support designating useModalNavigation for specific segments in Uri navigation

  • #1007: Re-license to MIT, following the Microsoft led projects

  • #1008: NavigationParameters: Not possible to specify parent type as generic parameter T

  • #1109: Retrieve current URI from Prism Xamarin.Forms NavigationService

  • #1111: Include pdb file in nuget package

  • #1024: XF: NavigationService swallowing Exceptions

  • #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property. The following changes were made to accommodate these changes:
    IDeviceService

  • deprecated OnPlatform methods

  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string

  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

  • #1027: Support macOS

  • #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible

  • #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called

  • #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation

  • #1054: When deep linking within NavigationPage, page order is reversed

  • #1063: Master of MasterDetailPage will not be destroyed

  • #1074: Optimize Xamarin Forms DryIoc adapter performance

  • #1085: Error occurs if null path is specified in EventToCommandBehavior

  • #1089: DebugLogger does not work in nuget-package

  • #1099: Introduce a Behavior factory into the navigation service

  • #1132: Prism Forms Modularity extension methods

  • #1133: IModuleCatalog AddModule returns wrong type

  • #1139: Modularity Enhancements

  • #1175: Upgraded to Unity 5 Breaking

  • #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

  • #1166: Custom NavigationPage is not working properly Prism 7

  • #1187: Change TabbedPage navigation behavior Breaking

  • #1198: Rename IApplicationLifecycle to IApplicationLifecycleAware Breaking

  • #1200: Add GoBackToRoot method

  • #1232: PageNavigationService should check for MultiPage Parent

  • #1225: OnNavigatedTo Contains Extra Parameter

  • #1254: remove support for DependenyService autoresolution Breaking

  • #1286: Adding modules to Prism in newest PR version

  • added IPageLifecycleAware and PageLifecycleAwareBehavior to enable responding to the Page's Appearing and Disappearing events

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterTypeForNavigationOnPlatform<MainPage, MainPageViewModel>("Main", 
	new Platform<MainPage_Android>(RuntimePlatform.Android),
	new Platform<MainPage_iOS>(RuntimePlatform.iOS));

PrismApplication API Changes - BREAKING

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 IContaierProvider interfaces.

Notable changes:

  • Removed ModuleCatalog property
  • Changed signature of ConfigureModuleCatalog() to ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
  • Changed signature of RegisterTypes() to RegisterTypes(IContainerRegistry containterRegistry)
  • Removed CreateContainer() method
  • Removed CreateNavigationService() method
  • Removed CreateLogger() method
  • Removed CreateModuleManager() method
  • Removed CreateModuleCatalog() method
  • Changed order of application initialization process (platform specific types are registered before application types)
  • Container property is now of type IContainerProvider
  • Renamed ConfigureContainer to RegisterRequiredTypes(IContainerRegistry containterRegistry)
  • Renamed RegisterTypeForNavigation to RegisterForNavigation
  • Fixes issues that broke Popups Plugin

IModule API Changes - BREAKING

  • Obsolete Initialize() method - move all existing code into RegisterTypes and OnInitialized methods
  • Added RegisterTypes(IContainerRegistry containerRegistry) method - used to register types with the container
  • Added OnInitialized() method - used to perform any action after the module has been created, and types have been registered with the container.

ModuleInfo API Changes - BREAKING

  • Removed defaut ctor
  • Changed order of ctor parameters from ModuleInfo(Name, ModuleType, Mode) to ModuleInfo(ModuleType, Name, Mode)

TabbedPage Navigation Behavior Change - BREAKING

Current Behavior (v6.3.0)

NavigateAsync("TabbedPage/ViewA/ViewB") will select the tab ViewA in the TabbedPage if it exists, then continue navigating. If ViewA does not exist as a tab, then you will continue to navigate as expected.

NavigateAsync("TabbedPage/NavigationPage/ViewA/ViewB") would search the TabbedPage for the first instance of a tab that was a NavigationPage, then navigate within the Navigation page the remaining ViewA and ViewB pages. This provided the ability to deep link into a tab's nested navigation page, but there was no way to opt-out of this behavior.

Also, the INavigationAware methods did not get called to all tabs meaning that you would be responsible for forwarding any parameters to all your tabs.

New Behavior

NavigateAsync("TabbedPage/ViewA/ViewB") will no longer select any tabs, but rather continue processing the navigation as separate pages on the navigation stack.

If you wish to select a tab, you will now use a parameter called "selectedTab" to indicate which tab you would like to select.

NavigateAsync("TabbedPage?selectedTab=MiddleTab/ViewA/ViewB")

This will navigate to the TabbedPage, selected the "MiddleTab" and continue navigating ViewA and ViewB onto the navigation stack.

For tabs that are wrapped inside a NavigationPage, you do not need to change anything. The syntax is the same. This will search each tab to see if it is a navigation page and if the CurrentPage of the NavigationPage matches "MiddleTab", the tab will be selected. This is much more flexible than the existing behavior as before it would take the first instance of the NavigationPage found. Now you can choose which tab exactly.

There is a constant in the KnownNavigationParameters called SelectedTab that you can use instead of a string.

NavigateAsync($"TabbedPage?{KnownNavigationParameters.SelectedTab}=MiddleTab")

Some INavigationAware methods are now fired on all Tabs:

  • OnNavigatingTo will be invoked on the TabbedPage and ALL TABS.
  • OnNavigatedTo will be invoked on the TabbedPage and only the SELECTED TAB.
  • OnNavigatedFrom will be invoked on the TabbedPage and only the SELECTED TAB.

Note: the parameter key selectedTab is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Note: At this time there is no native support for deep linking into a Tab that is a navigation page. Please let me know if you need this functionality.

Dynamic Tab Generation

You can now dynamically create tabs when navigating to a TabbedPage by using the KnownNavigationParameters.CreateTab constant or by using the "createTab" parameter name.
_navigationService.NavigateAsync("MyTabbedPage?createTab=ViewA&createTab=ViewB");
This will create a TabbedPage and then create two tabs, ViewA and ViewB.
To create a tab that wraps a page in a NavigationPage, simply denote this as a nested hierarchy using the | character.
_navigationService.NavigateAsync("MyTabbedPage?createTab=NavigationPage|ViewA");

Remove pages from navigation stack

This feature allows you to remove pages form the navigation stack of a NavigationPage while at the same time navigating to a new page. For each page you wish to remove, prefix your navigation path with ../.

Example
Our app requires a user to login in order to edit "User" profile information. This will require the user to be prompted to login and then once successful continue to edit the profile. This leaves us with the following navigation stack:

"NavigationPage/UserList/UserDetails/LoginPage/EditUser"

If we were to hit the back button from the EditUser page, we would be returned to the LoginPage. This is not the desired experience. Instead, we want to go back to the UserDetails which was just updated. To achieve this we provide the following navigation URI from the LoginPage page with a successful login attempt.

NavigationService.NavigateAsync("../EditUser");

This would remove the LoginPage and then immediately navigate to the "EditUser" page which we now have access to.

You can chain the ../ instruction for each page that needs to be removed from the stack.

Given: "NavigationPage/ViewA/ViewB/ViewC/ViewD"
Navigate from ViewD with: NavigationService.NavigateAsync("../../../ViewE");
Results in: "NavigationPage/ViewA/ViewE"

Note: This only works when navigating within a NavigationPage! Modal pages are not supported.

UseModalNavigation in specific deep link segments

You can now control the various segments of a deep ink by setting the useModalNavigation parameter on any specific navigation segment in the URI.

NavigatAsync("NavigationPage/ViewA/ViewB/NavigationPage?useModalNavigation=true/ViewC/ViewD");

You can also use the built-in constant KnownNavigationParameters.UseModalNavigation

NavigatAsync($"NavigationPage/ViewA/ViewB/NavigationPage? {KnownNavigationParameters.UseModalNavigation} =true/ViewC/ViewD");

Note: the parameter key useModalNavigation is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Prism.Windows

  • #853: Backing out of a UWP mobile app quits the app
  • #867: Hardware back button press is not firing the BackRequested event first
  • #1022: Handle Share target activation
  • #1070: DeviceGestureServiceOnGoBackRequested fires two times on Win10 UWP
  • #1190: RestoreNavigation: Possible KeyNotFoundException
Pre-release
Pre-release

@dansiegel dansiegel released this Nov 16, 2017 · 253 commits to master since this release

Assets 30

Special Notes:

  • This is the first v7 preview for Prism Windows & Prism WPF.
  • Unity has been updated across all platforms to Unity 5. This is a breaking change for all Unity Applications across all platforms as namespaces have been changed from Unity 4 to Unity 5.
  • Prism Forms has been updated to 2.5. If you encounter build errors please update to the latest release of Visual Studio 2017/Visual Studio Mac.

Prism Core

  • .NET Standard Support

  • Added method to clear all errors on ErrorsContainer

  • Removed requirement for parameter in delegate definition of DelegateCommand.ObservesCanExecute Breaking
    Example:
    Old (v6.3): ObservesCanExcute((**vm**) => Property)
    New (v7.0): ObservesCanExecute(() => Property)

  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types
    Example:
    ObservesProperty(() => Property.NestedProperty.NestedPoperty)

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

Prism Windows (UWP)

  • #853: Backing out of a UWP mobile app quits the app
  • #867: Hardware back button press is not firing the BackRequested event first
  • #1022: Handle Share target activation
  • #1070: DeviceGestureServiceOnGoBackRequested fires two times on Win10 UWP
  • #1190: RestoreNavigation: Possible KeyNotFoundException

Prism Forms

  • #650: Navigating between Tabs Breaking

  • #683: .NET Standard support

  • #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android

  • #921: Add ability to Remove pages from the navigation stack

  • #1007: Re-license to MIT, following the Microsoft led projects

  • #1008: NavigationParameters: Not possible to specify parent type as generic parameter T

  • #1111: Include pdb file in nuget package

  • #1024: XF: NavigationService swallowing Exceptions

  • #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property. The following changes were made to accommodate these changes:
    IDeviceService

  • deprecated OnPlatform methods

  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string

  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

  • #1027: Support macOS

  • #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible

  • #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called

  • #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation

  • #1054: When deep linking within NavigationPage, page order is reversed

  • #1063: Master of MasterDetailPage will not be destroyed

  • #1074: Optimize Xamarin Forms DryIoc adapter performance

  • #1085: Error occurs if null path is specified in EventToCommandBehavior

  • #1089: DebugLogger does not work in nuget-package

  • #1099: Introduce a Behavior factory into the navigation service

  • #1132: Prism Forms Modularity extension methods

  • #1133: IModuleCatalog AddModule returns wrong type

  • #1139: Modularity Enhancements

  • #1175: Upgraded to Unity 5 Breaking

  • #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

  • #1166: Custom NavigationPage is not working properly Prism 7

  • #1187: Change TabbedPage navigation behavior Breaking

  • #1198: Rename IApplicationLifecycle to IApplicationLifecycleAware Breaking

  • #1200: Add GoBackToRoot method

  • #1232: PageNavigationService should check for MultiPage Parent

  • #1225: OnNavigatedTo Contains Extra Parameter

  • #1254: remove support for DependenyService autoresolution Breaking

  • added IPageLifecycleAware and PageLifecycleAwareBehavior to enable responding to the Page's Appearing and Disappearing events

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterTypeForNavigationOnPlatform<MainPage, MainPageViewModel>("Main", 
	new Platform<MainPage_Android>(RuntimePlatform.Android),
	new Platform<MainPage_iOS>(RuntimePlatform.iOS));

TabbedPage Navigation Behavior Change - BREAKING

Current Behavior (v6.3.0)

NavigateAsync("TabbedPage/ViewA/ViewB") will select the tab ViewA in the TabbedPage if it exists, then continue navigating. If ViewA does not exist as a tab, then you will continue to navigate as expected.

NavigateAsync("TabbedPage/NavigationPage/ViewA/ViewB") would search the TabbedPage for the first instance of a tab that was a NavigationPage, then navigate within the Navigation page the remaining ViewA and ViewB pages. This provided the ability to deep link into a tab's nested navigation page, but there was no way to opt-out of this behavior.

Also, the INavigationAware methods did not get called to all tabs meaning that you would be responsible for forwarding any parameters to all your tabs.

New Behavior

NavigateAsync("TabbedPage/ViewA/ViewB") will no longer select any tabs, but rather continue processing the navigation as separate pages on the navigation stack.

If you wish to select a tab, you will now use a parameter called "selectedTab" to indicate which tab you would like to select.

NavigateAsync("TabbedPage?selectedTab=MiddleTab/ViewA/ViewB")

This will navigate to the TabbedPage, selected the "MiddleTab" and continue navigating ViewA and ViewB onto the navigation stack.

For tabs that are wrapped inside a NavigationPage, you do not need to change anything. The syntax is the same. This will search each tab to see if it is a navigation page and if the CurrentPage of the NavigationPage matches "MiddleTab", the tab will be selected. This is much more flexible than the existing behavior as before it would take the first instance of the NavigationPage found. Now you can choose which tab exactly.

There is a constant in the KnownNavigationParameters called SelectedTab that you can use instead of a string.

NavigateAsync($"TabbedPage?{KnownNavigationParameters.SelectedTab}=MiddleTab")

Some INavigationAware methods are now fired on all Tabs:

  • OnNavigatingTo will be invoked on the TabbedPage and ALL TABS.
  • OnNavigatedTo will be invoked on the TabbedPage and only the SELECTED TAB.
  • OnNavigatedFrom will be invoked on the TabbedPage and only the SELECTED TAB.

Note: the parameter key selectedTab is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Note: At this time there is no native support for deep linking into a Tab that is a navigation page. Please let me know if you need this functionality.

Dynamic Tab Generation

You can now dynamically create tabs when navigating to a TabbedPage by using the KnownNavigationParameters.CreateTab constant or by using the "createTab" parameter name.
_navigationService.NavigateAsync("MyTabbedPage?createTab=ViewA&createTab=ViewB");
This will create a TabbedPage and then create two tabs, ViewA and ViewB.
To create a tab that wraps a page in a NavigationPage, simply denote this as a nested hierarchy using the | character.
_navigationService.NavigateAsync("MyTabbedPage?createTab=NavigationPage|ViewA");

Remove pages from navigation stack

This feature allows you to remove pages form the navigation stack of a NavigationPage while at the same time navigating to a new page. For each page you wish to remove, prefix your navigation path with ../.

Example
Our app requires a user to login in order to edit "User" profile information. This will require the user to be prompted to login and then once successful continue to edit the profile. This leaves us with the following navigation stack:

"NavigationPage/UserList/UserDetails/LoginPage/EditUser"

If we were to hit the back button from the EditUser page, we would be returned to the LoginPage. This is not the desired experience. Instead, we want to go back to the UserDetails which was just updated. To achieve this we provide the following navigation URI from the LoginPage page with a successful login attempt.

NavigationService.NavigateAsync("../EditUser");

This would remove the LoginPage and then immediately navigate to the "EditUser" page which we now have access to.

You can chain the ../ instruction for each page that needs to be removed from the stack.

Given: "NavigationPage/ViewA/ViewB/ViewC/ViewD"
Navigate from ViewD with: NavigationService.NavigateAsync("../../../ViewE");
Results in: "NavigationPage/ViewA/ViewE"

Note: This only works when navigating within a NavigationPage! Modal pages are not supported.

Pre-release

@dansiegel dansiegel released this Oct 13, 2017 · 336 commits to master since this release

Assets 14

Prism.Core

  • .NET Standard Support
  • Added method to clear all errors on ErrorsContainer
  • Removed requirement for parameter in delegate definition of DelegateCommand.ObservesCanExecute

Breaking
Example:
Old (v6.3): ObservesCanExcute((**vm**) => Property)
New (v7.0): ObservesCanExecute(() => Property)

  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types

Example:
ObservesProperty(() => Property.NestedProperty.NestedPoperty)

Prism.Forms

  • Fixed #650: Navigating between Tabs Breaking

  • Fixed #683: .NET Standard support

  • Fixed #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android

  • Fixed #921: Add ability to Remove pages from the navigation stack

  • Fixed #1007: Re-license to MIT, following the Microsoft led projects

  • Fixed #1008: NavigationParameters: Not possible to specify parent type as generic parameter T

  • Fixed #1111: Include pdb file in nuget package

  • Fixed #1024: XF: NavigationService swallowing Exceptions

  • Fixed #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property. The following changes were made to accommodate these changes:
    IDeviceService

  • deprecated OnPlatform methods

  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string

  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

  • Fixed #1027: Support macOS

  • Fixed #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible

  • Fixed #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called

  • Fixed #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation

  • Fixed #1054: When deep linking within NavigationPage, page order is reversed

  • Fixed #1063: Master of MasterDetailPage will not be destroyed

  • Fixed #1085: Error occurs if null path is specified in EventToCommandBehavior

  • Fixed #1089: DebugLogger does not work in nuget-package

  • Fixed #1132: Prism Forms Modularity extension methods

  • Fixed #1133: IModuleCatalog AddModule returns wrong type

  • Fixed #1139: Modularity Enhancements

  • Fixed #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

  • Fixed #1166: Custom NavigationPage is not working properly Prism 7

  • Fixed #1187: Change TabbedPage navigation behavior Breaking

  • Fixed #1198: Rename IApplicationLifecycle to IApplicationLifecycleAware Breaking

  • Fixed #1200: Add GoBackToRoot method

  • added IPageLifecycleAware and PageLifecycleAwareBehavior to enable responding to the Page's Appearing and Disappearing events

  • adds ability to create tabs in a TabbedPage dynamically through the querystring

You can now dynamically create tabs when navigating to a TabbedPage by using the KnownNavigationParameters.CreateTab constant or by using the "createTab" parameter name.
_navigationService.NavigateAsync("MyTabbedPage?createTab=ViewA&createTab=ViewB");
This will create a TabbedPage and then create two tabs, ViewA and ViewB.
To create a tab that wraps a page in a NavigationPage, simply denote this as a nested hierarchy using the | character.
_navigationService.NavigateAsync("MyTabbedPage?createTab=NavigationPage|ViewA");

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterTypeForNavigationOnPlatform<MainPage, MainPageViewModel>("Main",  
new Platform<MainPage_Android>(RuntimePlatform.Android), 
new Platform<MainPage_iOS>(RuntimePlatform.iOS)); 

TabbedPage Navigation Behavior Change - BREAKING

Current Behavior (v6.3.0)

NavigateAsync("TabbedPage/ViewA/ViewB") will select the tab ViewA in the TabbedPage if it exists, then continue navigating. If ViewA does not exist as a tab, then you will continue to navigate as expected.

NavigateAsync("TabbedPage/NavigationPage/ViewA/ViewB") would search the TabbedPage for the first instance of a tab that was a NavigationPage, then navigate within the Navigation page the remaining ViewA and ViewB pages. This provided the ability to deep link into a tab's nested navigation page, but there was no way to opt-out of this behavior.

Also, the INavigationAware methods did not get called to all tabs meaning that you would be responsible for forwarding any parameters to all your tabs.

New Behavior

NavigateAsync("TabbedPage/ViewA/ViewB") will no longer select any tabs, but rather continue processing the navigation as separate pages on the navigation stack.

If you wish to select a tab, you will now use a parameter called "selectedTab" to indicate which tab you would like to select.

NavigateAsync("TabbedPage?selectedTab=MiddleTab/ViewA/ViewB")

This will navigate to the TabbedPage, selected the "MiddleTab" and continue navigating ViewA and ViewB onto the navigation stack.

For tabs that are wrapped inside a NavigationPage, you do not need to change anything. The syntax is the same. This will search each tab to see if it is a navigation page and if the CurrentPage of the NavigationPage matches "MiddleTab", the tab will be selected. This is much more flexible than the existing behavior as before it would take the first instance of the NavigationPage found. Now you can choose which tab exactly.

There is a constant in the KnownNavigationParameters called SelectedTab that you can use instead of a string.

NavigateAsync($"TabbedPage?{KnownNavigationParameters.SelectedTab}=MiddleTab")

Some INavigationAware methods are now fired on all Tabs:

  • OnNavigatingTo will be invoked on the TabbedPage and ALL TABS.
  • OnNavigatedTo will be invoked on the TabbedPage and only the SELECTED TAB.
  • OnNavigatedFrom will be invoked on the TabbedPage and only the SELECTED TAB.

Note: the parameter key selectedTab is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Note: At this time there is no native support for deep linking into a Tab that is a navigation page. Please let me know if you need this functionality.

Remove pages from navigation stack

This feature allows you to remove pages form the navigation stack of a NavigationPage while at the same time navigating to a new page. For each page you wish to remove, prefix your navigation path with ../.

Example
Our app requires a user to login in order to edit "User" profile information. This will require the user to be prompted to login and then once successful continue to edit the profile. This leaves us with the following navigation stack:

"NavigationPage/UserList/UserDetails/LoginPage/EditUser"

If we were to hit the back button from the EditUser page, we would be returned to the LoginPage. This is not the desired experience. Instead, we want to go back to the UserDetails which was just updated. To achieve this we provide the following navigation URI from the LoginPage page with a successful login attempt.

NavigationService.NavigateAsync("../EditUser");

This would remove the LoginPage and then immediately navigate to the "EditUser" page which we now have access to.

You can chain the ../ instruction for each page that needs to be removed from the stack.

Given: "NavigationPage/ViewA/ViewB/ViewC/ViewD"
Navigate from ViewD with: NavigationService.NavigateAsync("../../../ViewE");
Results in: "NavigationPage/ViewA/ViewE"

Note: This only works when navigating within a NavigationPage! Modal pages are not supported.

@brianlagunas brianlagunas released this Oct 6, 2017 · 373 commits to master since this release

Assets 2

Prism.Core

  • .NET Standard Support
  • Added method to clear all errors on ErrorsContainer
  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types
    Example:
    ObservesProperty(() => Property.NestedProperty.NestedPoperty)

Prism.Forms

  • Fixed #683: .NET Standard support
  • Fixed #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android
  • Fixed #1008: NavigationParameters: Not possible to specify parent type as generic parameter T
  • Fixed #1024: XF: NavigationService swallowing Exceptions
  • Fixed #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property.
  • Fixed #1027: Support macOS
  • Fixed #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible
  • Fixed #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called
  • Fixed #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation
  • Fixed #1054: When deep linking within NavigationPage, page order is reversed
  • Fixed #1063: Master of MasterDetailPage will not be destroyed
  • Fixed #1085: Error occurs if null path is specified in EventToCommandBehavior
  • Fixed #1089: DebugLogger does not work in nuget-package
  • Fixed #1132: Prism Forms Modularity extension methods
  • Fixed #1133: IModuleCatalog AddModule returns wrong type
  • Fixed #1139: Modularity Enhancements
  • Fixed #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

IDeviceService

  • deprecated OnPlatform methods
  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string
  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterTypeForNavigationOnPlatform<MainPage, MainPageViewModel>("Main", 
	new Platform<MainPage_Android>(RuntimePlatform.Android),
	new Platform<MainPage_iOS>(RuntimePlatform.iOS));

TabbedPage Navigation Behavior Change - BREAKING

Current Behavior (v6.3.0)

NavigateAsync("TabbedPage/ViewA/ViewB") will select the tab ViewA in the TabbedPage if it exists, then continue navigating. If ViewA does not exist as a tab, then you will continue to navigate as expected.

NavigateAsync("TabbedPage/NavigationPage/ViewA/ViewB") would search the TabbedPage for the first instance of a tab that was a NavigationPage, then navigate within the Navigation page the remaining ViewA and ViewB pages. This provided the ability to deep link into a tab's nested navigation page, but there was no way to opt-out of this behavior.

Also, the INavigationAware methods did not get called to all tabs meaning that you would be responsible for forwarding any parameters to all your tabs.

New Behavior

NavigateAsync("TabbedPage/ViewA/ViewB") will no longer select any tabs, but rather continue processing the navigation as separate pages on the navigation stack.

If you wish to select a tab, you will now use a parameter called "selectedTab" to indicate which tab you would like to select.

NavigateAsync("TabbedPage?selectedTab=MiddleTab/ViewA/ViewB")

This will navigate to the TabbedPage, selected the "MiddleTab" and continue navigating ViewA and ViewB onto the navigation stack.

For tabs that are wrapped inside a NavigationPage, you can use the "|" symbol to indicate the hierarchy.

NavigateAsync("TabbedPage?selectedTab=NavigationPage|MiddleTab")

There is a constant in the KnownNavigationParameters called SelectedTab that you can use instead of a string.

NavigateAsync($"TabbedPage?{KnownNavigationParameters.SelectedTab}=MiddleTab")

This will search each tab to see if it is a navigation page and if the first page on the stack matches "MiddleTab". This is much more flexible than the existing behavior as before it would take the first instance of the NavigationPage found. Now you can choose which tab exactly.

Some INavigationAware methods are now fired on all Tabs:

  • OnNavigatingTo will be invoked on the TabbedPage and ALL TABS.
  • OnNavigatedTo will be invoked on the TabbedPage and only the SELECTED TAB.
  • OnNavigatedFrom will be invoked on the TabbedPage and only the SELECTED TAB.

Note: the parameter key selectedTab is now a reserved parameter name. Similar to a reserved keyword in C#. If you use this in your app as a key, you may experience undesired behavior.

Note: At this time there is no native support for deep linking into a Tab that is a navigation page. Please let me know if you need this functionality.

@brianlagunas brianlagunas released this Sep 22, 2017 · 419 commits to master since this release

Assets 2

Prism.Core

  • .NET Standard Support
  • Added method to clear all errors on ErrorsContainer
  • Add capability to DelegateCommand's ObservesProperty to observe properties of complex types
    Example:
    ObservesProperty(() => Property.NestedProperty.NestedPoperty)

Prism.Forms

  • Fixed #683: .NET Standard support
  • Fixed #765: Deep linking within a NavigationPage results in an incorrect ContentPage Title on Android
  • Fixed #1008: NavigationParameters: Not possible to specify parent type as generic parameter T
  • Fixed #1024: XF: NavigationService swallowing Exceptions
  • Fixed #1025: Xamarin.Forms deprecated the Device.OS property in favor of the RuntimePlatform property.
  • Fixed #1027: Support macOS
  • Fixed #1044: When Detail of MasterDetailPage is null, Modal Navigation is possible
  • Fixed #1045: When calling NavigateAsync with NavigationPage, old page's Destroy on the stack is not called
  • Fixed #1046: When calling DeepLink from Navigation Stack, the second page becomes Modal navigation
  • Fixed #1054: When deep linking within NavigationPage, page order is reversed
  • Fixed #1063: Master of MasterDetailPage will not be destroyed
  • Fixed #1085: Error occurs if null path is specified in EventToCommandBehavior
  • Fixed #1089: DebugLogger does not work in nuget-package
  • Fixed #1132: Prism Forms Modularity extension methods
  • Fixed #1133: IModuleCatalog AddModule returns wrong type
  • Fixed #1139: Modularity Enhancements
  • Fixed #1076: IActiveAware not working when ContentPage (as child of a TabbedPage) is wrapped into a NavigationPage

IDeviceService

  • deprecated OnPlatform methods
  • added DeviceRuntimePlatform property - this mimics the XF API and returns a string
  • added RuntimePlatform property which returns an Enum of type RuntimePlatform and wraps the XF string-based values

Container Extensions

  • deprecated the RegisterTypeForNavigationOnPlatform signature that requires explicit platform parameters
  • added new signature that accepts new IPlatform objects
    Example:
Container.RegisterTypeForNavigationOnPlatform<MainPage, MainPageViewModel>("Main", 
	new Platform<MainPage_Android>(RuntimePlatform.Android),
	new Platform<MainPage_iOS>(RuntimePlatform.iOS));