...
It is best to always create a default dependency instead.
Code Block |
---|
public voidclass CustomDependencyPropertySelector : DependencyPropertySelector { public override bool MustSubscribeToAllDependencyProperties(Type targetControlType) { return false; } } |
...
Code Block |
---|
ServiceLocator.Default.RegisterType<IDependencyPropertySelector, CustomerDependencyPropertySelector>CustomDependencyPropertySelector>(); |
Even when the custom IDependencyPropertySelector implementation returns an empty list, Catel will always subscribe to theĀ DataContext dependency property because it depends on that.
...