Radical Presentation 1.x to Radical 2.x for .NET Core
Main facts
Starting with V2 radical Framework supports only .NET Core 3, the Radical package targets netstandard2.0 and the Radical.Windows package targets netcoreapp3.0. WPF .NET Framework (what is generally referred as full framework) projects are not supported.
The Radical.Windows.Presentation package has been merged into Radical.Windows and by default the default IoC container provided by Microsoft.Extensions.DependencyInjection will be used. V2.0.0 supports external DI/IoC containers via generic host support.
New XML namespaces
New XML namespaces have been defined, the following is the list of the new namespaces:
http://schemas.radicalframework.com/windows/behaviorshttp://schemas.radicalframework.com/windows/inputhttp://schemas.radicalframework.com/windowshttp://schemas.radicalframework.com/windows/convertershttp://schemas.radicalframework.com/windows/controlshttp://schemas.radicalframework.com/windows/effectshttp://schemas.radicalframework.com/windows/markuphttp://schemas.radicalframework.com/windows/regions
The existing XML namespaces, starting with http://schemas.topics.it/wpf/radical/*, can still be used but should be considered as obsolete and will be removed in V3.
Breaking changes
Message broker IMessage support
IMessage supportThe IMessage interface has been removed, message broker supports only POCO messages in V2.
IEntityView custom properties
IEntityView custom propertiesEntity view AddPropertyMapping has been renamed to AddCustomProperty, RemovePropertyMapping to RemoveCustomProperty, and IsPropertyMappingDefined to IsCustomPropertyDefined
XML namespaces
XML namespace definition
http://schemas.topics.it/wpf/radical/windows/presentation/regionschanged tohttp://schemas.topics.it/wpf/radical/windows/regions.XML namespace definition
http://schemas.topics.it/wpf/radical/windows/presentation/behaviorschanged tohttp://schemas.topics.it/wpf/radical/windows/behaviors.
Removed and changed types and namespaces
The type
Facthas been removed.AutoCommandBindingsupports boolean properties and regular property changed notifications.The
RadicalWpfApplicationtype has been removed. If aDoEvents-like implementation is really needed original code can be copy/pasted from GitHub commits history.EntityValidationService<T>has been removed in favor ofDataAnnotationValidationService<T>.ApplicationBootstrapperhas been obsoleted in favor of the newAddRadicalApplication<TMainView>()extension method.All virtual members are now sealed.
It will be removed in v3.
Application configuration was previously part of the
ApplicationBootstrapperclass. Configuration options have been moved to theBootstrapConfigurationclass. To customize the Radical application behavior through theBootstrapConfigurationclass use the followingAddRadicalApplicationoverload:AddRadicalApplication( config => { ... }). For more information refer to the application configuration section.GetValidationService()has been removed fromAbstractViewModelandAbstractMementoViewModel. Use the new protectedValidationServiceproperty to set the current validation service instance.Radical.Windows.Presentationnamespace has been merged intoRadical.Windows.the
Topicsnamespace prefix has been dropped, the new root namesapce isRadical.WpfDispatchertype has been made internal.The AutoComplete behavior has been removed. To replace it, a sample demonstrating how to integrate with a third-party library is available in the autocomplete sample folder.
Behavior changes
External IoC containers are supported via generic host support.
Custom IoC registrations require the creation of a dependency installer.
Services override is not supported anymore. In 1.x it was possible to override an existing radical default service by registering a custom one in the IoC container of choice. The feature wil be reintroduced in a future minor release along with support for external IoC containers
How to migrate a Radical .NET Framework project to Radical for .NET Core 3
Create a new .NET Core 3 WPF project with the same name of the project you want to migrate
Replace the .NET Framework
csprojfile with the file of the project created at step 1 (the .NET Core project automatically adds all the files found in the current folder of the project, no manual changes are needed)Create
appsettings.jsonand copy the needed settings fromapp.configDelete
app.configIf
AssemblyInfo.cscontains information that need to be migrated:Rename
AssemblyInfo.cstoAssemblyInfo.old.csCopy
AssemblyInfo.old.csto the root of the project
Delete the
PropertiesfolderCopy
AssemblyInfo.csfrom the project created on step 1 to the root project folderIf needed copy information from
AssemblyInfo.old.cstoAssemblyInfo.csand deleteAssemblyInfo.old.cs
Add all the NuGet references a
PackageReferenceto the new project:Take note of the NuGet references from the
packages.configfileAdd the needed references from NuGet
Delete
packages.configfile
"Find and Replace":
using Topics.Radical->using Radicalusing Radical.Windows.Presentation.ComponentModel->using Radical.Windows.ComponentModelusing Radical.Windows.Presentation.Messaging->using Radical.Windows.Messaginghttp://schemas.topics.it/wpf/radical/->http://schemas.radicalframework.com/http://schemas.microsoft.com/expression/2010/interactivity->http://schemas.microsoft.com/xaml/behaviorsBroadcast(new CloseViewRequest(this))->Broadcast(this, new CloseViewRequest(this))
"Find and Remove"
http://schemas.radicalframework.com/windows/presentation/behaviors(behaviors are now inhttp://schemas.radicalframework.com/windows/behaviors)using Radical.Windows.Presentation.Boot;
Look at all the obsolete warnings and adjust code as necessary
Last updated