BindingOperations.SetBinding method

This topic has not yet been rated - Rate this topic

Associates a Binding with a target property on a target object. This method is the code equivalent to declaring a {Binding} in markup.

Syntax


public static void SetBinding(
  DependencyObject target, 
  DependencyProperty dp, 
  BindingBase binding
)

Parameters

target

Type: DependencyObject

The target to set the binding to.

dp

Type: DependencyProperty

The property on the target to bind, specified by its identifier. These identifiers are available as static properties on the type for the target object.

binding

Type: BindingBase

The binding to assign to the target property. This Binding should be established such that important Binding properties such as Path are already set before passing the parameter.

Remarks

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml.Data
Windows::UI::Xaml::Data [C++]

Metadata

Windows.winmd

See also

BindingOperations
Binding
XAML data binding sample
Data binding overview

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.