Changelog History
Page 5
-
v3.0.1 Changes
May 06, 2016 -
v3.0.0 Changes
February 29, 2016๐ I'm really pleased to finally announce the release of Caliburn.Micro 3.0.0 after a long period of being in beta. The major features of 3.0.0 are Windows 10 / UWP and Xamarin.Forms support. With this release you can use your view models across all major platforms that support C#!
It's important to note this is a change in the major versions to there may be breaking changes.
๐ Windows 10
๐ The Windows 10 release follows along with the Windows 8.1 and Windows Phone 8.1 releases and combines them into a single library which is great from a maitenance perspective. If we need to start adding features specific to Phone, Xbox or even HoloLens they'll be done using feature detection via
Windows.Foundation.Metadata.ApiInformation
.It includes conventions for new controls such as
SplitView
.๐ Also included is a sample showing how to set up a
SplitView
style app with theFrame
not being the root visual but inside theShellView
, this sample is available at Hello UWP.๐ฆ We now use the new open sourced XAML Behaviours package.
๐ Windows 8.1
- ๐ Fix for transparent tiles in App Manifest Helper
๐ Windows 8.0
๐ This release drops support for Windows 8.0 (different from Windows 8.1).
Xamarin Forms
๐ This release brings support for Xamarin.Forms which in abstraction layer over the different UIs in iOS, Android and Windows Phone Silverlight (Windows 8 / 10 support coming later). What's really interesting is that it comes with it's own XAML syntax (not the same as Windows XAML but very similar), this means we can get a closer to standard Caliburn.Micro experience. I was pleasantly surprised by how much I got ported reasonable easy.
๐ There are some limitations of the Xamarin.Forms flavour of of XAML, primarily there is no programmatic access to
x:Name
mean we cannot support named based conventions. We can still support attached properties such ascm:Message.Attach
as well as convention based view / view model location.\<ListView ItemsSource="{Binding Features}" HasUnevenRows="True" cm:Message.Attach="[Event ItemSelected] = [ShowFeature($selectedItem)]"\> \<ListView.ItemTemplate\> \<DataTemplate\> \<ViewCell\> \<ContentView cm:View.Model="{Binding}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"/\> \</ViewCell\> \</DataTemplate\> \</ListView.ItemTemplate\> \</ListView\>
Also included is the now standard navigation service and navigation helper methods
navigationService.For\<ProductViewModel\>() .WithParam(v =\> v.ProductId, 42) .Navigate();
A sample of this sort of app is can be found at Hello.Forms in the GitHub repository.
๐ One of the more interesting features here is that Xamarin.Forms runs on top of the existing mobile platform (Xamarin.iOS, Xamarin.Android and Windows Phone Silverlight). This makes it the first version where two different platforms of Caliburn.Micro have to run side by side. We essentially have two instances of
ViewModelLocator
, one inCaliburn.Micro.ViewModelLocator
for the current host platform and one atCaliburn.Micro.Xamarin.Forms.ViewModelLocator
if Xamarin.Forms is present.Xamarin.iOS and Xamarin.Android
๐ This release primarily targets Xamarin.Forms, however work has been done to allow your view models to be reused within a Xamarin.iOS or Xamarin.Android applications with no support around binding or conventions.
๐ These features will be added in later feature releases.
A sample of this sort of app is can be found at Hello.Xamarin in the GitHub repository.
Preserving State
๐ One new feature in this release is the
CachingFrameAdapter
. This subclass ofFrameAdapter
(which implementsINavigationService
in WinRT platforms such as Windows 8.1, Windows Phone 8.1 and Windows 10) will cache internally view models and reuse them on the appropriate navigation. This allows scenarios where the built inNavigationCacheMode
doesn't make sense but still preserve your view model state. A sample of this in action is available at Caliburn.Micro.State.Other Changes
- Resolved a WPF bug using
MainWindow
when it's disposed. - Resolved
ViewLocator.LocateForModelType
failing to deal with improperly reused views in WinRT. - Resolved a premature garbage collection issue in
Action.Invoke
. - โ Removed a unnecessary explicate collection in
FrameAdapter
. BindingScope
has been cleaned up a lot so will be easier to extend.- Async methods are now taken into account for conventions.
CanLogin
will be used as a guard forLoginAsync
and will be attached to a control withxName="Login"
. - ๐ Better handling of scenarios where a root frame is not being used with the navigation service.
- โ Removed the case sensitivity when adding custom special values to
MessageBinder
. - ๐
Screen.IsActive
,Screen.IsInitialised
andPropertyChangedBase.IsNotifying
are now virtual, we don't see then behaviour being overriden but a lot apps will need to add their own custom attributes to these properties.
๐ฅ Breaking Changes
- ๐ง The extensions projects have moved into the main platform assembly, these were initially created as a place for very platform specific code but they've outlived there usefulness and removing them reduces some maintenance costs.
- ๐
Bind.Model
had a feature enabling you to pass a string which usedIoC
to find the model. This was deprecated in 2.0.0 and has now been removed. SimpleContainer
now only uses public constructors.- ๐ The
UriFor
method has been deprecated in favour of justFor
given the lack of uri support on a number of platforms. - WinRT platforms now make use of
AssemblySourceCache
which means if your view models do not implementINotifyPropertyChanged
or views subclass fromUIElement
then they may not be found byViewLocator
orViewModelLocator
. This behaviour can be changed by modifyingAssemblySourceCache.ExtractTypes
.
Thanks
๐ Thank you to all who have contributed fixes, reported issues and generally feedback on the extended pre-release versions.
๐ As well a bit thanks to Marker Metro who sponsored a lot of the time it took me to put this 3.0.0 release together.
-
v3.0.0-beta2 Changes
November 30, 2015๐ All the release notes from 3.0.0-alpha and 3.0.0-beta1 apply to this release as well.
๐ Windows 10
- โ Added runtime directives to help with .NET Native compilation.
- โ Added a missing convention for
SplitView
๐ Windows 8.1
- ๐ Fix for transparent tiles in App Manifest Helper. Thanks @0x8DEADF00D
Other Changes
- ๐ฆ Uses the new open source UWP Behaviors nuget package.
- Async methods are now taken into account for conventions.
CanLogin
will be used as a guard forLoginAsync
and will be attached to a control withxName="Login"
. Thanks @BrunoJuchli - ๐ Better handling of scenarios where a root frame is not being used with the navigation service.
๐ฅ Breaking Changes
๐ All the breaking changes from 3.0.0-alpha and 3.0.0-beta1 apply to this release as well.
- ๐
DefaultPlatformProvider
has been removed withPlatformProvider.Current
now throwing an exception if not correctly initialized.
-
v3.0.0-beta1 Changes
August 11, 2015๐ All the release notes from 3.0.0-alpha apply to this release as well.
๐ Windows 10
๐ The Windows 10 release follows along with the Windows 8.1 and Windows Phone 8.1 releases and combines them into a single library which is great from a maitenance perspective. If we need to start adding features specific to Phone, Xbox or even HoloLens they'll be done using feature detection via
Windows.Foundation.Metadata.ApiInformation
.๐ Also included is a sample showing how to set up a
SplitView
style app with theFrame
not being the root visual but inside theShellView
, this sample is available at Hello UWP.Preserving state
๐ One new feature in this release is the
CachingFrameAdapter
. This subclass ofFrameAdapter
(which implementsINavigationService
in WinRT platforms such as Windows 8.1, Windows Phone 8.1 and Windows 10) will cache internally view models and reuse them on the appropriate navigation. This allows scenarios where the built inNavigationCacheMode
doesn't make sense but still preserve your view model state. A sample of this in action is available at Caliburn.Micro.State.Xamarin Forms
Included
NavigationHelper
which adds theFor<TViewModel>
method to allow easier view model navigation.navigationService.For<ProductViewModel>() .WithParam(v => v.ProductId, 42) .Navigate();
Other Changes
- Resolved a WPF bug using
MainWindow
when it's disposed. Thanks dvdorle. - Resolved
ViewLocator.LocateForModelType
failing to deal with improperly reused views in WinRT. - Resolved a premature garbage collection issue in
Action.Invoke
. - โ Removed a unnecessary explicate collection in
FrameAdapter
. BindingScope
has been cleaned up a lot so will be easier to extend.
๐ฅ Breaking Changes
๐ All the breaking changes from 3.0.0-alpha apply to this release as well.
- ๐ง The extensions projects have moved into the main platform assembly, these were initially created as a place for very platform specific code but they've outlived there usefulness and removing them reduces some maintenance costs.
- ๐
Bind.Model
had a feature enabling you to pass a string which usedIoC
to find the model. This was deprecated in 2.0.0 and has now been removed. SimpleContainer
now only uses public constructors. Thanks belyansky.- ๐ The
UriFor
method has been deprecated in favour of justFor
given the lack of uri support on a number of platforms. - WinRT platforms now make use of
AssemblySourceCache
which means if your view models do not implementINotifyPropertyChanged
or views subclass fromUIElement
then they may not be found byViewLocator
orViewModelLocator
. This behaviour can be changed by modifyingAssemblySourceCache.ExtractTypes
.