Skip to content

Releases: PrismLibrary/Prism

9.0.401 - Preview

14 Feb 22:01
51f0029
Compare
Choose a tag to compare
9.0.401 - Preview Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 9.0.271-pre...9.0.401-pre

9.0.271 - Preview

08 Oct 13:02
86b3706
Compare
Choose a tag to compare
9.0.271 - Preview Pre-release
Pre-release

License Change

The Prism team is committed to the long term sustainability of Prism. As a result we have changed the License for Prism moving forward. It is no longer being released under the MIT License. Please visit https://prismlibrary.com for more information on our new license options.

What's Changed

Full Changelog: 9.0.264-pre...9.0.271-pre

9.0.264 - Preview

07 Oct 15:07
Compare
Choose a tag to compare
9.0.264 - Preview Pre-release
Pre-release

License Change

The Prism team is committed to the long term sustainability of Prism. As a result we have changed the License for Prism moving forward. It is no longer being released under the MIT License. Please visit https://prismlibrary.com for more information on our new license options.

What's Changed

New Contributors

Full Changelog: DNF...9.0.264-pre

Final .NET Foundation Version

06 May 16:33
7f0b168
Compare
Choose a tag to compare
Pre-release

This is a procedural release.

Prism is leaving the .NET Foundation. Before making any changes to the Prism repo, we are archiving the current source code which is under the .NET Foundation.

Any code committed after this "Final .NET Foundation Version" release is no longer considered part of the .NET Foundation.

8.1.97

25 May 14:01
Compare
Choose a tag to compare

Prism 8.1

Prism 8.1 is largely a service pack release for Prism 8.0. If upgrading from Prism 7, it is recommended that you skip Prism 8.0 and instead use 8.1. Additionally Prism 8.1 offers a new Prism.Uno.WInUI platform target for those wishing to build either native WinUI3, or Cross Platform WinUI 3 apps with Uno Platform.

Bugs Fixed

  • [Bug] Prism.Forms.Regions in xaml not working when content view in top child #2415
  • [Enhancement] Apply AutowireViewModel automatically when using RegisterViewWithRegion #2236
  • [Enhancement] Support FlyoutPage from Xamarin.Forms 5 #2239
  • Make SetNavigationServiceForPage protected #2288
  • Handle Android Hardware GoBack #2391
  • [Enhancement] Added more MVVM Friendly APIs for registering Views with a Region (All Platforms)
  • fix: [UWP][WinUI] Support for RegionManager.IsInDesignMode #2419
  • Use the Target Element BindingContext instead of the Page VM #2404
  • Fixing DI NavigationService resolution #2354 #2218
  • Add support for WinUI 3 #2393
  • Non-generic register for navigation with view-model #2257
  • Update WPF to .NET 5 #2250

Prism.Forms

Additional updates have been done for Prism.Forms.Regions. This better aligns the API with the original WPF API.

Android GoBack

Note that for the new Android GoBack support for Prism.Forms you must update the OnBackPressed in the MainActivity. You may await the call to handle the result. This result could be generated from either a Dialog or Page Navigation result.

public override async void OnBackPressed()       
{            
    var result = await PrismPlatform.OnBackPressed(this);            
    if (!result.Success)            
    {
        System.Diagnostics.Debugger.Break();    
        if (result.Exception != null)    
        {    
            Console.WriteLine(result.Exception);
        }    
    }      
}

8.0.0.1909

21 Oct 18:12
3fc5286
Compare
Choose a tag to compare

Prism 8.0 RTM

It's here, the long awaited Prism 8. This is a huge release and contains a number of breaking changes, bug fixes, new features and even a brand new Platform! So lets officially welcome the Uno Platform to the Prism family of supported platforms!

CI Feed Access

Beginning with Prism 8.0 all CI packages moving forward will only be available to Sponsors on the Sponsor Connect package feed.

Prism.Core - Notable Changes

  • Added additional Registration Methods to allow Scoped Services. (NOTE: Prism uses scoped lifetimes for Prism.Forms and creates a new scope each time a new Page is navigated to. It is not used anywhere else by Prism)
  • Added additional Registration Methods to allow Factory / Delegate methods to register services
  • Added additional Registration Methods to allow registering a single Implementation type for multiple services
  • BREAKING Removed ILoggerFacade and entire Prism.Logging namespace - recommended migration use Prism.Plugin.Logging or other 3rd party logging frameworks
  • Added ContainerLocator (NOTE: This replaces the Common Service Locator in Prism.Wpf)
  • Added ContainerResolutionException to help better identify what could not be resolved. This includes a GetErrors method to help dig in and identify why a type failed to be resolved
  • DelegateCommand - Added support for PropertyChanged events that pass string.Empty
  • Added Await extension to execute callbacks when working inside of a void method without needing to use async void
  • Added overload for IEventAggregator to provide filter

Prism.Forms - Notable Changes

  • Fixed bug with Dialog Service where Dialog would appear behind a Modal page
  • Enhancement with Dialog Service. The Dialog Service now adds a Modal page with a transparent background to prevent user interaction with Navigation Bars on the NavigationPage, TabbedPage, or MasterDetailPage. This also fixes issues related to the reparenting of content that some people experienced
  • Consolidated IPlatformNavigationService with INavigationService
  • Removed Xamarin.Forms DependencyResolver support
  • INavigationService is now a Scoped service. A new Scope will be set each time the PageNavigationService creates a new page. This allows Prism to reuse the same instance of the NavigationService for your ViewModel, the XAML Navigation Extensions, and within Regions
  • Changed IPageBehaviorFactory - only ApplyPageBehaviors is exposed, all other methods have been moved to protected virtual methods in PageBehaviorFactory
  • Added Navigation Error Handler that can be called without using async void this allows you to specify a delegate that should be called to handle the exception encountered.
  • Removed IAutoInitialize - recommended migration use Prism.Magician on Sponsor Connect
  • Remove AutoRegisterForNavigation - recommended migration use the much more powerful Prism.Magician on Sponsor Connect
  • NEW FEATURE - Region support for Prism.Forms is HERE!!!

Prism.Wpf - Notable Changes

  • Removed Legacy Bootstrapper
  • Added new PrismBootstrapper that follows the PrismApplication pattern for those apps that cannot use PrismApplication
  • BEHAVIOR CHANGE: ViewModelLocator is now Opt-Out not Opt-In. The ViewModelLocator.AutowireViewModel will automatically be set to true if the DataContext is null and the property has not been set.
  • Added XAML ContainerProvider to help resolve types in XAML
  • Fixed CurrentEntry for views not in Journal
  • Added support for multiple dialog windows
  • Updated to netcoreapp3.1
  • Added generic overloads for RegisterMappings
  • Added RegisterViewWithRegion generic method

Changes:

  • 3fc5286 Merge pull request #2217 from PrismLibrary/uno-vml
  • 9cedce4 normalize VML Autowire property name
  • a342a38 fix working directory
  • 7bab4ed put Uno assemblies in Uno directory
  • 28bac21 prevent duplication of NuGet package artifacts
  • 75db987 update package feed info
  • 06aab3f use latest nuget
  • 10c492a Merge pull request #2215 from cabauman/docs/xml-comments
  • 0eb6d70 Add XML Docs to various interfaces and classes
  • 9ad0c69 Merge pull request #2194 from PrismLibrary/centralpackages
See More
  • 3b93818 deploy to Sponsor Connect
  • defb416 specify CentralPackageVersions in the global.json
  • 2889307 remove build targets
  • e0f45df wasm test fixes
  • 5c5d28a path fixes
  • 1f08f40 dependency updates
  • 077f1c5 ensure proper .net core version is installed
  • 9cae2a8 add dependabot
  • b232bbe update UI Build settings
  • 4b172d0 use central package versioning
  • fe087bb Merge pull request #2214 from PrismLibrary/remove-auto-stuff
  • b4ff238 fixed e2e app
  • faad634 removed auto initialize for nav parameters
  • 868fcfc Merge pull request #2213 from PrismLibrary/remove-auto-stuff
  • 6e3fbc9 updated solution to remove mockapp
  • 833c11d fixed e2e app using the auto register attribute
  • 28008c7 removed autoregister feature
  • 7a3d2fa added discussions link
  • 41c74c4 added sponsor action
  • 5ddd97b Merge pull request #2208 from PrismLibrary/housekeeping/fix-codeformatting
  • 4da8e8a Automated dotnet-format update
  • ca46320 add daily format action
  • 2bf255d Merge pull request #2205 from PrismLibrary/xcode-fixes
  • 0b9feaa provide xcode override method
  • be743c2 Merge pull request #2207 from ryoasai/Issue-2206
  • e3a0a96 Merge branch 'Issue-2206' of https://github.com/ryoasai/Prism into Issue-2206
  • cd8bc0a Ensure transient reuse irrespective of default reuse setting.
  • 6dbcd01 Ensure transient reuse irrespectiveof default reuse setting.
  • 66e5b93 Merge pull request #2202 from PrismLibrary/issue-2196
  • ad6a286 fixed propertychanged with empty string
  • 2617907 Merge pull request #2195 from PrismLibrary/unity
  • 6e030ec remove dual registration hack
  • 44d200c Merge pull request #2192 from PrismLibrary/autowire-update
  • 8d7ebad add Prism.Forms.Regions nuget links
  • a65ae44 remove DebugType from Prism.Core
  • e2c119b update sdks
  • e8e2bb8 add missing Prism.Forms.Regions package description
  • ee373eb Prevent AutowireViewModel if BindingContext has been set
  • 1203c29 [fix]: check DataContext to prevent creating the ViewModel twice
  • 2f81418 Merge pull request #2191 from PrismLibrary/dialog-improvements
  • 6526c6e added more overrides
  • 24b8b15 dialog service improvements
  • 763982e Merge pull request #2185 from pavinan/patch-1
  • b48e9f9 Fixed Twitter URLs.
  • e4ee8b8 Update README.md
  • 4049b3e Merge pull request #2181 from PrismLibrary/transparent-modal
  • 3edc501 fix iOS modal transparency
  • 6daceb0 Merge pull request #2180 from PrismLibrary/module-manager
  • 75256c0 add tests for the ModuleManager Extensions
  • 413ca57 add ModuleInfo collection to IModuleManager
  • 5a06d41 Merge pull request #2178 from PrismLibrary/remove-lagcy-bootstrappers
  • 59d1eba fixing test - change in underlying DryIoc API reference
  • 44de606 fix moq resolution with DryIocContainerExtension
  • 88b90b9 removed legacy bootstrapper
  • d5cb510 Merge pull request #2176 from PrismLibrary/remove-logger
  • f1bf6ca add missing shared test project
  • 48c2533 fixing xml docs
  • 86510aa remove ILoggerFacade
  • 463d18a Merge pull request #2175 from PrismLibrary/xaml-catalog
  • c200a23 Merge pull request #2174 from Reapism/patch-1
  • 3c45cd0 comment out post build task
  • 760e306 reverted .net core target version
  • 3fee86e added tests and fixed backwards compatibility for old file path
  • 20e0cb8 fixed xcopy command to run on the build server
  • b...
Read more

8.0.0.1850 - Preview

25 Aug 17:44
4049b3e
Compare
Choose a tag to compare
8.0.0.1850 - Preview Pre-release
Pre-release

Description

This is the Prism 8 Release Candidate! There are lots of changes including some major breaks as noted by the major version bump. Many of the obsolete API's in Prism 7 have now been removed in Prism 8.

BREAKING

  • The entire Prism.Logging namespace has been removed. This will present a number of binary breaks including with popular libraries like Prism.Plugin.Popups. You may need to wait for v8 compatible packages to be produced before updating.
  • The Legacy Container specific Bootstrapper's in Prism.Wpf have been removed. You will need to migrate to the new PrismBootstrapper or PrismApplication

Highlights

  • Prism.Uno... Introducing Prism for Uno / WinUI. Note that if you are building a straight WinUI/UWP app there is no dependency on Uno even though you will need to install the Prism.Uno packages.
  • More robust Container Abstractions now allow registering Factory / Delegate methods, and support for Scoped Lifetimes
  • Added ContainerResolutionException that can help you to diagnose exactly what caused the error
  • Removed CommonServiceLocator from Prism.Wpf
  • Updates to Xamarin.Forms 4.6 - Adds InvokeOnMainThreadAsync methods to IDeviceService
  • Adds Async helpers to avoid async void without blocking the UI Thread
  • Adds brand new Prism.Forms.Regions package to bring classic Regions support to Xamarin.Forms projects. NOTE It'll be a while before we get docs for this. In the mean time, look at the WPF docs on Regions as the API is ALMOST entirely the same. You can also look at the E2E app for Forms in the Prism repo
  • Updates to Xamarin.Forms 4.8
  • Changed the Behavior of the Prism.Forms DialogService. We no longer reparent the content of the currently visible ContentPage. We now use a Modal Page with newly added support for transparent Modal Page backgrounds from Xamarin.Forms
  • Changed the definition of IModuleManager and added several helper methods to make it even easier to manage and load your Modules
  • Updated Prism.Forms INavigationService with method calls/extensions that were previously on the now removed IPlatformNavigation
  • Support for automatic resolution and injection Func<T>, Lazy<T>, and IEnumerable<T>
  • Made the ViewModelLocator.AutowireViewModel property Opt-Out rather than Opt-In for WPF & Uno Platform
  • Removed the DependencyResolver integration with Xamarin.Forms

Changes:

  • 4049b3e Merge pull request #2181 from PrismLibrary/transparent-modal
  • 3edc501 fix iOS modal transparency
  • 6daceb0 Merge pull request #2180 from PrismLibrary/module-manager
  • 75256c0 add tests for the ModuleManager Extensions
  • 413ca57 add ModuleInfo collection to IModuleManager
  • 5a06d41 Merge pull request #2178 from PrismLibrary/remove-lagcy-bootstrappers
  • 59d1eba fixing test - change in underlying DryIoc API reference
  • 44de606 fix moq resolution with DryIocContainerExtension
  • 88b90b9 removed legacy bootstrapper
  • d5cb510 Merge pull request #2176 from PrismLibrary/remove-logger
See More
  • f1bf6ca add missing shared test project
  • 48c2533 fixing xml docs
  • 86510aa remove ILoggerFacade
  • 463d18a Merge pull request #2175 from PrismLibrary/xaml-catalog
  • c200a23 Merge pull request #2174 from Reapism/patch-1
  • 3c45cd0 comment out post build task
  • 760e306 reverted .net core target version
  • 3fee86e added tests and fixed backwards compatibility for old file path
  • 20e0cb8 fixed xcopy command to run on the build server
  • b3016d8 added some tests
  • 061d078 removed old API for creating xaml catalogs
  • 382e691 renamed xaml module catalog
  • 6efa943 implemented new XamlResourceCatalog
  • 6f3f297 Fix some formatting and comments.
  • 7b614ec Merge pull request #2173 from PrismLibrary/remove-platform-di
  • 23527f7 Merge pull request #2172 from PrismLibrary/platformnavigation
  • 43a3cbb remove DependencyResolver test
  • a4fe2aa link updates
  • 086d30c update deprecated Icon to use IconImageSource
  • 0b1ac68 removes the dependency resolver from PrismApplication
  • 818495b merge IPlatformNavigationService into INavigationService
  • 1a355be Remove ILoggerFacade from PageNavigationService
  • 522799b Merge pull request #2171 from PrismLibrary/vml-opt-out
  • 30a5b5b remove debug code
  • c31d9d8 make viewmodellocator opt-out
  • 43d1545 Merge pull request #2169 from PrismLibrary/transparent-modals
  • 05e9a73 updating tests
  • 0ca6e0e use modal page
  • d1646c3 Merge pull request #2168 from PrismLibrary/region-fixes
  • 591bdb0 remove GitHub packages
  • 92283bd use base region
  • b83ffd4 change to RegisterForRegionNavigation - fixes #2166
  • d9f8368 Merge pull request #2165 from PrismLibrary/package-descriptions
  • 9fa8493 update package descriptions
  • 804739e Merge pull request #2077 from PrismLibrary/wip-regions
  • 09ecf4a hold back CollectionView Adapter
  • 3726ad1 fix LayoutView bindings
  • 468f1ff simplifying Carousel Item Binding
  • 614a038 Merge pull request #2164 from ebariche/dev/eb/update-to-uno-3
  • cb93dd9 Update to Uno 3.0
  • e995276 updates and fixes for Carousels and registration
  • bc2fadb Registration updates
  • 829475b Merge pull request #2163 from Algorithman/DirectoryModuleCatalogSpelling
  • 29167bc Fixed spelling error: GetNotAlreadyLoadedModuleInfos
  • 493b91f handle null RegionManager on Region
  • c5729b7 build updates
  • 2317805 Update Region Module demos
  • 46f38e4 update module registrations
  • 8d2b2eb implementing adapters
  • 9525981 use delegate registration for Region Adapter Mappings & Behaviors
  • 16e376a fixing sln file
  • b70f870 remove support for Partial Views
  • c1fa5dd delay region created and tracking of INavigationService
  • 3c3460c Fixing lifecycle so Region created once fully parented to the Page
  • ed97ba9 fixing sln file
  • 099f27e adding Prism.Forms.Regions to main solution
  • 17c3225 getting Region Navigation working
  • 2d793b9 adding Region Module to E2E app
  • dc59903 fixing Module State
  • 75e8db4 update to Xamarin.Forms 4.5
  • 34863fa cross-plat sharing and region manager implementation
  • b023dd6 wip regions
  • 59cc94b Merge pull request #2147 from Jesus805/master
  • 4906e5f Merge pull request #2143 from PrismLibrary/lifo
  • 01f629a adding test suite for containers
  • 6c5344e allow multiple registrations with Last In First Out
  • c71957a updated readme with pluralsight links
  • 8bcca7c Update SelectorItemsSourceSyncBehavior.cs
  • 4eeacaf Merge pull request #2146 from Jesus805/master
  • 6d44a1e XML Documentation for Dryloc.Wpf, Unity.Wpf and Prism.Core
  • 10365d5 Merge pull request #2145 from Jesus805/master
  • 302d93d Removed extra to
  • ec3fad3 space
  • d9a0853 Added XML comments to IDialogParameters
  • 88f69bc Fixed some spelling mistakes in ParametersBase
  • b2be9cc Merge pull request #2067 from Jesus805/master
  • 695606b Merge pull request #2069 from gayaK/master
  • 750a914 add Prism.Templates issue link
  • 6e7a514 Removed duplicate catalog documentation parameter
  • efe9497 Changed I...
Read more

8.0.0.1740 - Preview

05 May 23:45
6244391
Compare
Choose a tag to compare
8.0.0.1740 - Preview Pre-release
Pre-release

Description

This is the initial Prism 8 Preview! There are lots of changes including some major breaks as noted by the major version bump. Many of the obsolete API's in Prism 7 have now been removed in Prism 8.

Highlights

  • Prism.Uno... Introducing Prism for Uno / WinUI. Note that if you are building a straight WinUI/UWP app there is no dependency on Uno even though you will need to install the Prism.Uno packages.
  • More robust Container Abstractions now allow registering Factory / Delegate methods, and support for Scoped Lifetimes
  • Added ContainerResolutionException that can help you to diagnose exactly what caused the error
  • Removed CommonServiceLocator from Prism.Wpf
  • Updates to Xamarin.Forms 4.6 - Adds InvokeOnMainThreadAsync methods to IDeviceService
  • Adds Async helpers to avoid async void without blocking the UI Thread

Changes:

  • 6244391 Merge pull request #2110 from PrismLibrary/scopednavigation
  • 0374fcb all disable UI Tests
  • 2a69d55 ensure the PrismApplication is created before we set a main page
  • 6544370 fixing issue with DryIoc injecting a Page to IPageAware
  • 165e697 let Xamarin.Forms restore transitively
  • 34f5f76 update test dependencies
  • 87c793b update Unity.Container
  • ac6b487 adding shared container
  • 2896142 fixing Scoped Navigation
  • 5c33d8c scope navigation
See More
  • 527faaf Merge pull request #2103 from rssllgrrtt/Adding-Device.InvokeOnMainThreadAsync-to-DeviceService-#2043
  • 1b7218c Removed view centric hooks from DeviceService
  • b6faee2 Merge pull request #2108 from unoplatform/dev/jela/uwp-fix
  • ca30a61 Merge pull request #2105 from d3fkn1ght/xmlDocs2
  • a27288e Updated TargetFrameworks, updated to XF 4.6.0.726 and added support for additional methods and properties from the Device class.
  • e06a353 fix(uno): Fix Windows initialization sequence
  • 3ee01c9 fix: Adjust xml comment in DryIocContainerExtension
  • ee6a519 Merge pull request #2107 from PrismLibrary/issue-2106
  • 227ea29 using the ContainerLocator as the VML resolver.
  • 845f263 Revert "fixed ConfigureViewModelLocator"
  • 4dd403b fixed ConfigureViewModelLocator
  • 72f1a35 Added documenation for:
  • ba493ca wrap ctors
  • 24945db setup containers for container extensions
  • 581c3f5 Updated to latest Xamarin.Forms (4.5.0.657) and mapped to new Device.InvokeOnMainThreadAsync methods
  • 94155bb Added a "BeginInvokeOnMainThreadAsync" method to "IDeviceService"
  • 8597347 Merge pull request #2101 from unoplatform/dev/jela/uwp-fix
  • d243376 Merge pull request #2100 from unoplatform/dev/jela/android-test-optional
  • be92542 fix(uno-uwp): Disable library layout generation
  • 6bba1a5 fix(uno-e2e): Disable build fail on android UI tests failure
  • 7e4e92a fixing bad docs
  • 076a7cf Merge pull request #2073 from WaldemarCoding/master
  • 722c45a changes requested by dan
  • 631660a Merge pull request #2075 from d3fkn1ght/xmlDocs1
  • 22d8eda implement dans comments
  • bb2efd3 Solved CS1591 in INavigationParamters[Internal].cs
  • e0e865e Missed one
  • 3d48ffc Resolved some CS1573,1591
  • df64def Merge pull request #2097 from PrismLibrary/prismapplication-tests
  • e91dc8a Update ParametersBase.cs
  • 3c983f9 added tests for PrismApplicationBase
  • 2f077f9 Merge pull request #2096 from PrismLibrary/bootstrapper-tests
  • 43f7f5b Merge pull request #2086 from PrismLibrary/containerextensions
  • 95d1c2a disable randomly failing test
  • 6cd9106 Added test to validate required types were registered
  • 2036140 adding tests for Container Registrations
  • 82325a9 Merge pull request #2084 from PrismLibrary/task-extensions
  • 5f55d28 added unit tests
  • 82b6bca added Task extensions for async/void tasks
  • 130ed2a Merge pull request #2094 from unoplatform/dev/jela/uwp-adjust
  • f26ee78 fixing file location
  • 507652f fix(WinUI): Remove explicit dependency on CommonServiceLocator
  • fa2fd01 fix(Uno): Adjust Prism.Uno UWP library layout
  • a99eeed adding tests for ContainerResolutionException
  • 439bc9d fixing mocked test
  • 70ba338 adding DefaultRules to DryIocContainerExtension
  • 936e3df implementing registration overloads
  • 14b1cc0 adding ContainerResolutionException #2078
  • 4d898d4 adding CreateScope
  • 0cb5b2e remove extra space
  • 9f75d1a Merge pull request #2089 from PrismLibrary/autoregister
  • 460c0b8 fixing uno rebase
  • 2f4b0f5 fixing issues with parallel tests
  • 9bdc2ea adding tests for AutoRegisterForNavigation - fixes #2088
  • 66a24a9 Merge pull request #2092 from PrismLibrary/bootstrapper-tests
  • 94b4462 Added unit tests for new PrismBootstrapperBase
  • 05c82a2 Merge pull request #2091 from lv1il0s/master
  • 2c434c0 Move reference to Xamarin.Forms.Mocks to nuget/packageReference
  • 291d1fe Merge pull request #2090 from unoplatform/dev/jela/uitests-adjust
  • b0dcdee fix(uno): Use set-runtime step to set the mono version used on macOS builds
  • 017ed03 fix: Adjust Dialog test to use the default dialog
  • e072949 fix: Restore default test context to WebAssembly
  • 1d4a962 Merge pull request #2054 from unoplatform/dev/jela/upstream-merge
  • d8e47c2 Remove unused Dialog from Uno e2e sample
  • a418c7e Update uno libraries to make UWP use conditional to Windows host
  • 3c916c3 Align Uno PrismAppliationBase with common PrismInitializationExtensions
  • f85446c Use HasBinding for Wpf/Uno in place of BindingOperations.GetBinding
  • a63b29f Add Uno Default implementation for IDialogWindow
  • 359f3fb Move Uno Suspending to PrismApplicationBase
  • 19d0cb5 Use Forms modularity for Uno implementation
  • efa56f2 Update Uno sample to include a module
  • cb57f7e Add Uno support for InvokeCommandAction
  • eb82da6 restore modularity imports
  • 073790c Enable Uno Wasm UI Testing
  • ed292e8 Enable easier net48 cross-targeting
  • c109f91 Add support for Uno Platform and WinUI
  • 032fd5e fixing E2E status badges
  • 47dc850 Merge pull request #2085 from PrismLibrary/parameter-refactor
  • b14cac8 refactored parameter classes to use ParametersBase class
  • edefb5a Merge pull request #2081 from EdwardBlair/2080
  • bc32e36 TIL: template donesn't have an enabled property
  • e99fcf1 Remove whacky predicate logic and use enabled property
  • dfd9693 Update ParameterExtension.cs
  • 13ea1df Update ErrorsContainer.cs
  • ae08e5f Update IDestructible.cs
  • 0f05a87 Update ErrorsContainer.cs
  • a1139fd Update ErrorsContainer.cs
  • 7b5d73e Update ParametersExtensions.cs
  • 46fb645 Update ParametersBase.cs
  • 13fbbfe Update ParameterExtension.cs
  • 1f1a9d9 Actually they do look prettier this way
  • 7f381cd Fix csproj paths
  • fec2a83 use dotnet test powers...
Read more

7.2.0.1422 SR1

21 Nov 17:06
a2231be
Compare
Choose a tag to compare

Prism 7.2 SR1

This is a service release for Prism 7.2. This includes several small bug fixes as noted in the Change Log and changes to make conversions from query string parameters to strong types including Enums more reliable.

Changes:

  • a2231be Merge pull request #1953 from PrismLibrary/enum-autoinitialize
  • 053eb30 Fixing Enum Support to allow setting from numeric or string
  • 26e090c included tests for each function changed + considered enum name or value during conversion
  • cbacc3f included tests for each function changed + considered enum name or value during conversion
  • ed16196 Merge pull request #1952 from PrismLibrary/dialog-bindingcontext
  • bb835e2 ensure content maintains Binding Context fixes #1948
  • 5201fb5 update exempt labels
  • 4ad0fca Merge pull request #1951 from fredyadriano90/INavigationPageOptions-Type
  • b3243c8 Update INavigationPageOptions.cs
See More
  • 90828a1 Open generic pages and double tabs navigation (#1943)
  • 543f539 Merge pull request #1945 from AmrAlSayed0/patch-1
  • c9a11d9 Update PrismApplicationBase.cs
  • aab10a4 Fixes NRE when app put to sleep when MainPage isn't set
  • 178d9a8 Merge pull request #1931 from PrismLibrary/dialogServiceFixes
  • b760621 Adding Unit Tests for DialogService
  • cd42169 null handler for callback fixes #1883
  • 0c35b6b fixes #1894
  • c1486f2 general updates & fixes for tooling changes that broke SDK Extras
  • a4c131a Merge pull request #1919 from akamud/return-exception-confirm-nav
  • 931484e Return Navigation Exception for Navigations when ConfirmNavigation is false
  • 0c0b5b2 Provide tests for ConfirmNavigation exception scenarios
  • 6a49e0e Update packages link
  • ff8da00 Merge pull request #1868 from PrismLibrary/shelldialog
  • dafde8a Support Shell for Dialogs fixes #1865
  • ef3d803 fixed #1857

This list of changes was auto generated.

7.2.0.1367

24 Jul 16:56
128328a
Compare
Choose a tag to compare

Summary

Prism 7.2 represents some major fundamental changes. Be sure to read the release notes in full. In addition to adding several new great API's there are some major breaking changes particularly for Xamarin.Forms developers.

Prism.Core

  • #1668: Expands IoC abstractions to allow checking for registered services and naming instances or singletons.
  • #1680: Fixes Ambiguous match when using DelegateCommand.ObserveProperty
  • #1677: Changes IContainerRegistry to provide a Fluent API
  • #1796: Optimize Weak DelegateReference for EventAggregator

Prism.Forms

  • #1589: OnNavigatedFrom method is not called when changing detail on MasterDetailPage
  • #1615: Add the ability to switch tabs
  • #1625: Master Detail to Tab Page Navigation broken in 7.1
  • #1683: Add navigation animation or modal navigation with XAML Navigation Extensions
  • #1663: Refactored platform navigation methods
  • #1669: Allow Create/Destroy Action Sheet buttons with only a name. Allow passing tuples to Navigation Service
  • #1700: Platform Specific View Registration not respected
  • #1704: Make XAML Navigation Extensions inherit from BindableObject. Make properties Bindable
  • #1748: [BREAKING] Make INavigatingAware Obsolete and introduce IInitialize, IInitializeAsync & IAutoInitialize
  • #1754: Fully support bindings for XAML Navigation
  • #1757: Add Automatic View Registration
  • #1806: Removes FastExpressionCompiler for DryIoc due to iOS incompatibility
  • #1814: Adding DialogService
  • #1822: Enhancing Modal Logic to reduce/eliminate need to specify modal navigation when Navigating Back. Enhances Navigation Exception Messaging with new NavigationException class
  • #1842: Fixes reparenting bug for DialogService in XF 4.X on Android with Screen Reader enabled

View/ViewModel Initialization

After numerous user survey's and interviews it became apparent that the intent of INavigatingAware had been become unclear and that users were actually overwhelmingly asking for a breaking change. INavigatingAware is no longer supported. For those who may be using OnNavigatingTo with INavigationAware this will be most impactful as a behavior change as INavigatingAware has been removed from INavigationAware meaning that it will no longer be called. For those who have implemented INavigatingAware directly you will see a build error. The impact should be minimal by simply renaming all instances of INavigatingAware to Initialize.

Using IAutoInitialize

IAutoInitialize is designed for those cases where you are passing objects around. By default we do a Non-Case-Sensitive lookup between the Navigation|Dialog Parameters and the Properties in your ViewModel. If one is found we will automatically try to set the property for you.

_navigationService.NavigateAsync("ViewB" ("title", "Hello World"), ("fooBar", "some other value"));

public class ViewBViewModel : IAutoInitialize
{
    public string Title { get; set; }
    public string FooBar { get; set; }
}

In the above example your ViewModel will be initialized with the values passed in the NavigationParameters or DialogParameters. If these are static variables (meaning the won't change during the lifecycle of your View/ViewModel you would not need to implement INotifyPropertyChanged for them.

public class ViewBViewModel
{
    [AutoInitialize(true)
    public string Title { get; set; }

    [AutoInitialize("fooBar")
    public string Foo { get; set; }
}

In this example you'll notice that we have some slight variations where we have added NavigationParameter attributes. The attributes allow you to decorate your properties to make them Required or specify a different name that you will use in your NavigationParameters. Note that if you make a property Required and you fail to pass the parameter this will throw an Exception that you will need to check for in the NavigationResult.

Automatic View Registration

Automatic Registration can be used for either an Application or Module. Note that there is an optional Automatic property. When Automatic is set to true Prism will not look for any attributes but will simply look for any contained types that are a Page type. If there is a Page type it will automatically be registered.

[AutoRegisterForNavigation]
public class App : PrismApplication
{
}

[AutoRegisterForNavigation(Automatic = true)]
public class AwesomeModule : IModule
{
}

Using the Dialog Service

The Dialog Service operates by updating the current ContentPage's layout and placing a new View over the top of the existing Content, and then unwinding the changes back to it's original state. This gives the appearance of a Popup similar to what you may see when using Prism.Plugin.Popups but is driven entirely by native Xamarin.Forms.

Custom Alert Custom Dialog
Custom Alert Custom Dialog

The Dialog Service provides for a lot of flexibility and customization to help you produce dialogs that look and feel like they belong in your app. This includes an ability to shift the position, change the mask color or provide an entire custom mask layer.

To Start you simply need to implement IDialogAware, and raise the RequestClose event when you are ready to close the dialog.

public class DemoDialogViewModel : BindableBase, IDialogAware, IAutoInitialize
{
    public DemoDialogViewModel()
    {
        CloseCommand = new DelegateCommand(() => RequestClose(null));
    }

    private string title = "Message";
    public string Title
    {
        get => title;
        set => SetProperty(ref title, value);
    }

    private string message;
    [AutoInitialize(true)] // Makes Message parameter required
    public string Message
    {
        get => message;
        set => SetProperty(ref message, value);
    }

    public DelegateCommand CloseCommand { get; }

    public event Action<IDialogParameters> RequestClose;

    public bool CanCloseDialog() => true;

    public void OnDialogClosed()
    {
        Console.WriteLine("The Demo Dialog has been closed...");
    }

    public void OnDialogOpened(IDialogParameters parameters)
    {
        // No need to do anything as IAutoInitialize will take care of what we need here...
    }
}
<?xml version="1.0" encoding="utf-8" ?>
<Grid xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:prism="http://prismlibrary.com"
      prism:ViewModelLocator.AutowireViewModel="True"
      prism:DialogLayout.RelativeWidthRequest="{OnIdiom Default=0.75, Desktop=0.5}"
      BackgroundColor="White"
      x:Class="HelloWorld.Views.DemoDialog">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <BoxView Color="Black" />
    <Label Text="{Binding Title}"
           Style="{DynamicResource TitleStyle}"
           Margin="20,5"
           TextColor="White" />

    <Label Text="{Binding Message}"
           Margin="20,0,20,10"
           Grid.Row="1" />

    <Button Text="Ok"
            Command="{Binding CloseCommand}"
            HorizontalOptions="Center"
            Margin="0,0,0,10"
            Grid.Row="2"/>
</Grid>

With your View and ViewModel created you now need to register the Dialog to use it. This can be registered in your App.xaml.cs or in a Module.

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    containerRegistry.RegisterDialog<DemoDialog, DemoDialogViewModel>();
}

Prism.WPF

  • #1296: Support for IDestructilbe in WPF projects
  • #1544: .Net Core 3 Support
  • #1601: InitializeModules() should be called even if there's no shell
  • #1676: Ambiguous match found when ObserveProperty
  • #1666: A New IDialogService for WPF
  • #1732: Updated .NET Core 3 DirectoryModuleCatalog
  • #1796: WeakDelegatesManager::RemoveListener performance
  • #1805: Attached RegionManager to Dialog by default
  • #1826: Using Enum for IDialogResult.Result

A New IDialogService for WPF

Currently, the only way to show any type of dialog with Prism is by using the PopupWindowAction in combination with System.Windows.Interactivity. To be honest, I really dislike this approach. It's over complex, highly verbose, difficult to implement, and is very limited. The limitations are covered pretty well in Issue #864

Instead, I created a new IDialogService API that will replace the PopupWindowAction altogether. This service will allow developers to show any dialog they want either modal, or non-modal, and have complete control over their dialog logic.

The implementation looks like this:

public interface IDialogService
{
    void Show(string name, IDialogParameters parameters, Action<IDialogResult> callback);
    void ShowDialog(string name, IDialogParameters parameters, Action<IDialogResult> callback);
}

The idea here is that Prism will no longer provide any built-in dialogs like Notification or Confirmation. Mainly because the Prism implementations are UGLY and will never match the styling of your beautiful WPF application. So, it's important that you are able to register your own dialogs.

Create Your Dialog View

Your dialog view is a simple UserControl that can be designed anyway you please. The only requirement it has a ViewModel that implements IDialogAware set as it's DataContext. Preferably, it will utilize the ViewModelLocator

<UserControl x:Class="HelloWorld.Dialogs.NotificationDialog"
             xmlns="http://schemas.micr...
Read more