Language
Edit

WindowsXamlHostBase.Bind Method

Definition

Binds this wrapper object's exposed WPF DependencyProperty with the wrapped UWP object's DependencyProperty for what effectively works as a regular one- or two-way binding.

public void Bind(string propertyName, System.Windows.DependencyProperty wpfProperty, Windows.UI.Xaml.DependencyProperty uwpProperty, object converter = default, System.ComponentModel.BindingDirection direction = System.ComponentModel.BindingDirection.TwoWay);
member this.Bind : string * System.Windows.DependencyProperty * Windows.UI.Xaml.DependencyProperty * obj * System.ComponentModel.BindingDirection -> unit
Public Sub Bind (propertyName As String, wpfProperty As DependencyProperty, uwpProperty As DependencyProperty, Optional converter As Object = Nothing, Optional direction As BindingDirection = System.ComponentModel.BindingDirection.TwoWay)

Parameters

propertyName
String

the registered name of the dependency property

wpfProperty
DependencyProperty

the DependencyProperty of the wrapper

uwpProperty
Windows.UI.Xaml.DependencyProperty

the related DependencyProperty of the UWP control

converter
Object

a converter, if one's needed

direction
BindingDirection

indicates that the binding should be one or two directional. If one way, the Uwp control is only updated from the wrapper.

Applies to