Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The use of await or Task.ContinueWith to await the result is now necessary or use the code below:

Code Block
if (await messageService.ShowInfo("message", other parameters...) == MessageBoxResult.Yes)
{
    // Handle yes here
}

IUIVisualizerService

The use of await or Task.ContinueWith to await the result is now necessary or use the code below:

Code Block
await uiVisualizerService.ShowDialog<MyViewModel>();
 
// Window is closed here thanks to the await keyword

Optimizing views (especially 3rd party)

Catel 4.0 introduces a much simpler way to use Catel on 3rd party controls. This means that the following changes have been applied and might be breaking:

  • Removed GetViewModelType() from view base classes. Instead use the IViewModelLocator to ensure Catel can find the view models. Note that it is possible to manually register a custom view with a view model in case the view / view model don't match any naming convention.
  • Removed GetViewModelInstance() from view base classes. Customize the IViewModelFactory instead.
  • Removed ValidateDataDiscardChanges and ApplyChanges from all views except DataWindow
  • Merged ViewLoaded and Loaded events on IViewModelContainer and IView interfaces
  • Renamed ViewLoading and ViewUnloading events on IViewModelContainer to Loading and Unloading
  • Renamed IViewLoadedManager to IViewLoadManager

Removed IServiceLocator.RemoveInstance methods

The IServiceLocator.Remove[x] methods are removed. Use the RemoveType methods instead.

Changed CompositeCommand

The composite command will always allow execution, even when commands don't allow it. Therefore the AllowPartialExecution is now set to false by default.

If there is a requirement to allow partial invocation, set this property to true.

Added time to all log calls

The time parameter has been added to all log calls. This is a breaking change for all classes implementing ILogListener.

Behavior changes

To improve multiple platforms support, all parameters of the following methods on BehaviorBase have been removed:

Code Block
OnAssociatedObjectLoaded(object sender, EventArgs e) => OnAssociatedObjectLoaded()
 
OnAssociatedObjectUnloaded(object sender, EventArgs e) => OnAssociatedObjectUnloaded()