BindingExtensions

Name Value
Assembly Catel.MVVM
Namespace Catel.MVVM
Available on Portable Class Libraries, Xamarin - Android
public static class BindingExtensions

Extension methods to create bindings on platforms that initially don’t support bindings.

Methods

AddSourceEvent(Binding binding, string eventName)

Adds an additional event subscription to support change notification. This extension method will use the Source to add an event.

Parameters

Name Description
binding The binding.
eventName Name of the event.

Returns

Catel.MVVM.Binding.

Exceptions

Name Description
ArgumentNullException The binding isnull.
ArgumentException The eventName isnull or whitespace.

AddSourceEvent(Binding binding, string eventName)

Adds an additional event subscription to support change notification. This extension method will use the Source to add an event.

Parameters

Name Description
binding The binding.
eventName Name of the event.

Returns

Catel.MVVM.Binding.

Exceptions

Name Description
ArgumentNullException The binding isnull.
ArgumentException The eventName isnull or whitespace.

AddTargetEvent(Binding binding, string eventName)

Adds an additional event subscription to support change notification. This extension method will use the Target to add an event.

Parameters

Name Description
binding The binding.
eventName Name of the event.

Returns

Catel.MVVM.Binding.

Exceptions

Name Description
ArgumentNullException The binding isnull.
ArgumentException The eventName isnull or whitespace.

AddTargetEvent(Binding binding, string eventName)

Adds an additional event subscription to support change notification. This extension method will use the Target to add an event.

Parameters

Name Description
binding The binding.
eventName Name of the event.

Returns

Catel.MVVM.Binding.

Exceptions

Name Description
ArgumentNullException The binding isnull.
ArgumentException The eventName isnull or whitespace.

GetBindingValue(Binding binding)

Gets the binding value. If the binding isnull, this method will returnnull.

Parameters

Name Description
binding The binding.

Returns

The binding value.


Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion