layout | title |
---|---|
page |
Migrating Projects to 2.0.0 |
Caliburn.Micro 2.0.0 reflects a large change to the internal structure of the project. By splitting the code into two components (a portable assembly, and a number of platform specific assemblies) we better allow you to create code that's dependent upon Caliburn.Micro in Portable Class libraries.
This change does create some breaking API changes, and as well we used the move 2.0.0 to clean up some of API to bring it more into line.
This document will try to outline all the changes you may see updating a project to 2.0.0. It's currently not exhaustive and will be amended as required.
EventAggregator.Publish
now takes an action to marshal the event. UseEventAggregator.PublishOnUIThread
for the existing behaviour.- XAML namespace references to Caliburn.Micro for functionality such as
Message.Attach
should be renamed fromclr-namespace:Caliburn.Micro;assembly=Caliburn.Micro
toclr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platform
. On WPF if you're using thexmlns:cm="http://www.caliburnproject.org"
syntax then there's no change. On WinRT platforms (Windows 8, Windows 8.1 and Windows Phone 8.1) thexmlns:cm="using:Caliburn.Micro"
syntax will continue to work. IResult
usesCoroutineExecutionContext
instead ofActionExecutionContext
.BootstrapperBase.Start
is now calledBootstrapperBase.Initialize
BootstrapperBase.Initialize
andCaliburnApplication.Initialize
is now NOT automatically called before theDisplay*
methods. If you need it to be then callInitialise
from the constructor.BindableCollection<T>
move operations aren't automatically dispatched to the UI thread.Bind.Model="some-key-string"
is obsolete and should not be used.ViewAware.CacheViews
has been removed, useViews
instead.ViewAware
now uses weak values to hold a reference to the view.
Bootstrapper<T>
has been removed. UseBootstrapperBase
and overrideOnStartup
with a call toDisplayRootViewFor<T>()
instead.
PhoneBootstrapper
is now calledPhoneBootstrapperBase
.