Class BindingOperations
Provides static methods to manipulate bindings, including Binding, MultiBinding objects.
Inheritance
Inherited Members
Namespace: System.Windows.Data
Assembly: OpenSilver.dll
Syntax
public static class BindingOperations
Methods
| Improve this Doc View SourceGetBindingExpression(DependencyObject, DependencyProperty)
Returns the BindingExpression object associated with the specified binding target property on the specified object.
Declaration
public static BindingExpression GetBindingExpression(DependencyObject target, DependencyProperty dp)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | target | The binding target object where dp is. |
| DependencyProperty | dp | The binding target property from which to retrieve the BindingExpression object. |
Returns
| Type | Description |
|---|---|
| BindingExpression | The BindingExpression object associated with the given property or null if none exists. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | The target and dp parameters cannot be null. |
GetMultiBindingExpression(DependencyObject, DependencyProperty)
Returns the MultiBindingExpression object associated with the specified binding target property on the specified object.
Declaration
public static MultiBindingExpression GetMultiBindingExpression(DependencyObject target, DependencyProperty dp)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | target | The binding target object where dp is. |
| DependencyProperty | dp | The binding target property from which to retrieve the MultiBindingExpression object. |
Returns
| Type | Description |
|---|---|
| MultiBindingExpression | The MultiBindingExpression object associated with the given property or null if none exists. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | The target and dp parameters cannot be null. |
SetBinding(DependencyObject, DependencyProperty, Binding)
Creates and associates a new BindingExpression with the specified binding target property.
Declaration
public static BindingExpression SetBinding(DependencyObject target, DependencyProperty dp, Binding binding)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | target | The binding target of the binding. |
| DependencyProperty | dp | The target property of the binding. |
| Binding | binding | The Binding object that describes the binding. |
Returns
| Type | Description |
|---|---|
| BindingExpression | The instance of BindingExpression created for and associated with the specified property. |
SetBinding(DependencyObject, DependencyProperty, BindingBase)
Creates and associates a new instance of BindingExpressionBase with the specified binding target property.
Declaration
public static BindingExpressionBase SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | target | The binding target of the binding. |
| DependencyProperty | dp | The target property of the binding. |
| BindingBase | binding | The BindingBase object that describes the binding. |
Returns
| Type | Description |
|---|---|
| BindingExpressionBase | The instance of BindingExpressionBase created for and associated with the specified property. The BindingExpressionBase class is the base class of BindingExpression and MultiBindingExpression. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | The binding parameter cannot be null. |