Caliburn.Micro Xaml made easy

Caliburn.Micro 3.1.0 released

A small feature and bug fix release to clean out some of the backlog before 4.0.0.

Included are the following

  • #439 Fixes up an issue using commas in constant values cm:Message.Attach="ShowTitle('One, Two, Three')"
  • #432 Stop calling InitializeCompontent on Xamarin.Forms, this was mostly used for a underused feature of .xaml files without a code behind. On the non-XF platforms this method has re-entry protection, the XF version did not.
  • #423 Fixes a null reference in the Setup.WPF sample.
  • #417 Handle a ContentPropertyAttribute that doesn’t supply a property name (WPF’s Frame does this).
  • #364 Support OnViewLoaded in Xamarin.Forms when the view is a ContentPage.
  • #352 Add an extension point BindingScope.GetVisualParent to help people who use visual “bridge” libraries.
  • #319 Add $clickedItem Special Value for WinRT / UWP based projects.
  • #278 Add a navigation service for WPF and Silverlight with a sample. Note this service may change in 4.0.0 with an effort to align all the navigation services.
  • #247 Add an extension point on PropertyChangedBase and BindableCollection<T> named OnUIThread to allow people to customize how property changed notifications are dispatched to the UI thread.

New Samples

Recently I’ve gone through an effort to rebuild and reogranize the samples for Caliburn.Micro. There a number of goals:

  1. Have consistent setup examples for all supported platforms.
  2. Have examples of most framework features on all supported platforms.
  3. Highlight novel scenarios for using Calbirn.Micro.

These projects can also form the foundation for anyone looking to repro a small issue with ease.

Setup

An example of a barebones setup for each supported platform, just beyond the bare minimum (includes a container and dependency injection.) These include:

Features

A solution that demonstrates the usage of most major framework features across all the supported platforms (showing some of the inevitable platform discrepancies). Also this solution provides an example of using a Shared project to share code (in this case the view models) across mulitple platforms. The features covered include:

  • Binding Conventions
  • Action Conventions
  • Coroutines
  • Dispatching to the UI thread
  • Event Aggregation
  • Design Time Conventions
  • Conductors and Composition

Scenarios

A collection of solutions highlighting one off scenarios that may or not apply to multiple platforms. They’re such that demonstrating them on all platforms would not add extra value. These include:

  • Switching IoC containers to something like Autofac
  • The use of F#
  • Customising the framework

Often unseen contributions

Lately I’ve been thinking about the work that goes into producing open source software and the often unseen contributions people and companies make. These companies provide software often for free to open source projects for often little thanks.

So here’s a quick list of the unseen / not really thought about support provided to Caliburn.Micro.

  • JetBrains provides a much needed open source license to Resharper.
  • GitHub provides Git hosting for the source and the hosting for this website.
  • Microsoft provides VSTS hosting for an experimental (at the moment) build server, an MSDN license for Visual Studio Enterprise and access to product teams for assistance.
  • The various control companies Telerik, Syncfusion and Infragistics, with access to the control libraries assists with testing.
  • Xamarin - When Xamarin was an independent company they provided a Business license.

Without their help I doubt we’d be able to have the software we have today, nor be in a position for even more change in the future.

Roadmap announced

Today I’ve published the Roadmap for Caliburn.Micro, this will help codify the direction over the first half of the year. The idea is to sketch out in broad strokes the areas that will be focussed on and what will be needed.

I’m considering trying out GitHub projects to help drive development effort for these broad sections.

Have a read and let me know what you think.

Caliburn.Micro 3.0.2 released

This is a minor bug fix release.

  • Fixed support for child view models at design time. #214, #358, #359, #379
  • Caliburn.Micro.Xamarin.Forms nuget package now depends on Caliburn.Micro for applications helping to ensure you have all the right packages. #323
  • Stopped extra calls to InitializeComponent in Xaamarin.Forms. #326
  • Support .NET 4.0 in the Caliburn.Micro.Start nuget package. #348
  • Ensure view model activation and deactivation is happening on back navigation in Xamarin.Forms. #342
  • ContentView bindings correctly deal with message targets in Xamarin.Forms. #349
  • Convention added for DocumentViewer in WPF. #368
  • Added some generic overloads to methods on SimpleContainer. #390
  • ViewLocator will now correctly call GetInstance for resolution of the view falling back to manual instantiation. #339

The highest impact bug fix for this release is the last one, previously the ViewModelLocator would call GetInstance to try to resolve the view model (falling back to GetAllInstances and then manual instantiation), ViewLocator however previously only called GetAllInstances.

This release makes them consistent, however it could cause problems if you’re throwing exceptions on no resolution of a service from the container. I’d recommend if you are doing this checking whether the type is assignable to UIElement (or some view type) and return null (or skip throwing the exception).