Open Collective
Open Collective
Loading
Released Catel 5.10.0
Published on April 2, 2019 by Geert van Horrik

We are happy to announce that we have released Catel 5.10.0. As always, we recommend to update your apps and libraries to this new version as soon as possible. The new version can be retrieved via NuGet.

Although this is a minor release (non-breaking changes), we are proud of this update. Besides the code changes listed below, Catel 5.10 also adds improved support for x:Bind in UWP.

Compiled bindings (x:Bind) in UWP

Compiled bindings in UWP are great for performance, but a bit hard to use in combination with (automatically resolving) MVVM frameworks because the views usually don’t have typed view model classes on them.

To make it super-easy to use compiled bindings with Catel, we’ve implemented a feature so you only have to add a single property on the view (code-behind). Catel checks whether this (typed) property exists and will take care of the change notifications for you.

  1. public sealed partial class BikeSummaryView
  2. {
  3.     public BikeSummaryView()
  4.     {
  5.         InitializeComponent();
  6.     }
  7.    
  8.     internal BikeSummaryViewModel VM
  9.     {
  10.         get { return ViewModel as BikeSummaryViewModel; }
  11.     }
  12. }

Since this is a reserved keyword, Catel will automatically take care of the change notifications and x:Bind can be used directly against VM:

  1. <TextBlock Text="{x:Bind VM.Title}" />

Note that the binding should either be set to Mode=OneWay per binding or for all bindings in a view by specifying x:DefaultBindMode="OneWay".

Important

We have thoroughly tested the beta versions on our own code-bases and contacted paying customers about the important changes we made. Want to receive updates as well? Make sure to support Catel on Open Collective.

Changes

  • #1249 Add ViewModelContextService to allow runtime overrides of the DataContext to use for view model injection
  • #1283 Add ViewModelLifetimeManagement to all views
  • #1272 Implement IProcessService for UWP
  • #1287 Add RaisePropertyChanged to view base classes
  • #1288 Add reserved ‘VM’ property on views with automatic change notifications
  • #1260 Allow classes derived from Catel.UserControl to use the AddChild method
  • #1261 Update NewtonSoft.Json to 12.x
  • #1268 Initialize VM grid in DataWindow.Initialized instead of DataWindow.ContentChanged
  • #1269 Create VM Auditor to subscribe keyboard events instead of CommandManager constructor
  • #1270 Add faster override for IModelExtensions.ClearIsDirtyOnAllChildren() (add suspendNotifications parameter)
  • #1284 Replace ‘CloseViewModelOnUnloaded’ and ‘PreventViewModelCreation’ with ‘ViewModelLifetimeManagement’
  • #1291 Update Xamarin.Forms to 3.6
  • #1252 Catel.MVVM.Xamarin.Forms MessageBox showing without buttons
  • #1259 DataWindow should respect the focusFirstControl parameter
  • #1262 IModelExtensions.ClearIsDirtyOnAllChildren() not working with a collection of ModelBase
  • #1267 Fix binding errors on UserControl for UWP
  • #1286 ServiceLocator.ResolveType with tag should pass tag to TypeFactory
  • #1289 AssemblyHelper.GetLoadedAssemblies(System.AppDomain) causes System.MissingMethodException in Xamarin.UWP