Binding Constructor (String)
Collapse the table of content
Expand the table of content

Binding Constructor (String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the Binding class with an initial property path for the data source.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Sub New ( _
	path As String _
)

Parameters

path
Type: System.String
The initial property path for the source of the binding.

ExceptionCondition
ArgumentNullException

path is Nothing.

The path can be a direct property of the source object or subproperties.

To set the data source to be the Source object, the path should be an empty string ("").


'Create the source string 
Dim s As String = "Hello"

'Create the binding description 
Dim b As New Binding("")
b.Mode = BindingMode.OneTime
b.Source = s

'Attach the binding to the target 
MyText.SetBinding(TextBlock.TextProperty, b)


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft