Sets the binding if the dependency property has not been set previously and the style of the element don't set the property.

Namespace:  C1.Silverlight
Assembly:  C1.Silverlight (in C1.Silverlight.dll)

Syntax

C#
[ObsoleteAttribute("Use generic overload instead in order to check sourceProperty existence at compilation time.", 
	true)]
public static void SetBinding(
	this FrameworkElement target,
	DependencyProperty dp,
	Object source,
	string sourcePropertyName
)
Visual Basic
<ExtensionAttribute> _
<ObsoleteAttribute("Use generic overload instead in order to check sourceProperty existence at compilation time.",  _
	True)> _
Public Shared Sub SetBinding ( _
	target As FrameworkElement, _
	dp As DependencyProperty, _
	source As Object, _
	sourcePropertyName As String _
)

Parameters

target
Type: System.Windows..::..FrameworkElement
The target.
dp
Type: System.Windows..::..DependencyProperty
The dependency property which will be set.
source
Type: System..::..Object
The source.
sourcePropertyName
Type: System..::..String
Name of the source property.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also