Skip to content

ControlTemplateContext.Bind<T> method (1 of 3)

Keeps the same property of a target part in sync with Owner.

public void Bind<T>(Element target, MewProperty<T> property)
parameter description
target The template part to update.
property The property to forward from owner to part.

ControlTemplateContext.Bind<T> method (2 of 3)

Section titled “ControlTemplateContext.Bind<T> method (2 of 3)”

Keeps a target part property in sync with a property of Owner: applies the current value now and forwards subsequent changes. Released when the template instance is discarded.

public void Bind<T>(Element target, MewProperty<T> targetProperty, MewProperty<T> sourceProperty)
parameter description
target The template part to update.
targetProperty The part property to write.
sourceProperty The owner property to follow.

ControlTemplateContext.Bind<TTarget,TSource> method (3 of 3)

Section titled “ControlTemplateContext.Bind<TTarget,TSource> method (3 of 3)”

Keeps a target part property in sync with a converted property of Owner: applies the converted current value now and converts each subsequent change. Released when the template instance is discarded.

public void Bind<TTarget, TSource>(Element target, MewProperty<TTarget> targetProperty,
MewProperty<TSource> sourceProperty, Func<TSource, TTarget> convert)
parameter description
target The template part to update.
targetProperty The part property to write.
sourceProperty The owner property to follow.
convert Maps the owner value to the part value.