Versions Compared

Key

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

...

The FastObservableCollection does not raise events for every item, but only invokes events for the complete range of items added to or removed from the collection.

Implementing IDependencyPropertySelector

Catel uses a special wrapping technology to wrap bindings to dependency properties to be able to add change notifications for all target platforms. Though this technology works great, it might have impact on performance and this is not always necessary. By implementing a custom IDependencyPropertySelector, developers can tweak the interesting dependency properties per type.

Note

By default Catel subscribes to all dependency properties to not cause breaking changes

It is best to always create a default dependency instead.

Code Block
public void CustomDependencyPropertySelector : DependencyPropertySelector
{
    public override bool MustSubscribeToAllDependencyProperties(Type targetControlType)
	{
		return false;
	}
}

Then register it in theĀ ServiceLocator:

Code Block
ServiceLocator.Default.RegisterType<IDependencyPropertySelector, CustomerDependencyPropertySelector>();

Even when the custom IDependencyPropertySelector implementation returns an empty list, Catel will always subscribe to theĀ DataContext dependency property because it depends on that.

Specify throttling on the ViewModelBase

...