Skip to content

ControlExtensions.BindText method (1 of 8)

Binds the text to an observable value.

public static Label BindText(this Label label, ObservableValue<string> source)
parameter description
label Target label.
source Observable source.

The label for chaining.

Sets: Label.Text, MultiLineTextBox.Text, TextBlock.Text, TextBox.Text


ControlExtensions.BindText method (2 of 8)

Section titled “ControlExtensions.BindText method (2 of 8)”

Binds the text to an observable value.

public static MultiLineTextBox BindText(this MultiLineTextBox textBox,
ObservableValue<string> source)
parameter description
textBox Target multiline text box.
source Observable source.

The multiline text box for chaining.


ControlExtensions.BindText method (3 of 8)

Section titled “ControlExtensions.BindText method (3 of 8)”

Binds the text to an observable value.

public static TextBox BindText(this TextBox textBox, ObservableValue<string> source)
parameter description
textBox Target text box.
source Observable source.

The text box for chaining.


ControlExtensions.BindText<T> method (4 of 8)

Section titled “ControlExtensions.BindText<T> method (4 of 8)”

Binds the text to an observable value.

public static T BindText<T>(this T textBlock, ObservableValue<string> source)
where T : TextBlock
parameter description
T Text block type.
textBlock Target text block.
source Observable source.

The text block for chaining.


ControlExtensions.BindText<TSource> method (5 of 8)

Section titled “ControlExtensions.BindText<TSource> method (5 of 8)”

Binds the text to a converted observable value.

public static Label BindText<TSource>(this Label label, ObservableValue<TSource> source,
Func<TSource, string> convert)
parameter description
TSource Source value type.
label Target label.
source Observable source.
convert Source-to-text converter.

The label for chaining.


ControlExtensions.BindText<TSource> method (6 of 8)

Section titled “ControlExtensions.BindText<TSource> method (6 of 8)”

Binds the text to a converted observable value.

public static MultiLineTextBox BindText<TSource>(this MultiLineTextBox textBox,
ObservableValue<TSource> source, Func<TSource, string> convert,
Func<string, TSource>? convertBack = null)
parameter description
TSource Source value type.
textBox Target multiline text box.
source Observable source.
convert Source-to-text converter.
convertBack Optional text-to-source converter.

The multiline text box for chaining.


ControlExtensions.BindText<TSource> method (7 of 8)

Section titled “ControlExtensions.BindText<TSource> method (7 of 8)”

Binds the text to a converted observable value.

public static TextBox BindText<TSource>(this TextBox textBox, ObservableValue<TSource> source,
Func<TSource, string> convert, Func<string, TSource>? convertBack = null)
parameter description
TSource Source value type.
textBox Target text box.
source Observable source.
convert Source-to-text converter.
convertBack Optional text-to-source converter.

The text box for chaining.


ControlExtensions.BindText<T,TSource> method (8 of 8)

Section titled “ControlExtensions.BindText<T,TSource> method (8 of 8)”

Binds the text to a converted observable value.

public static T BindText<T, TSource>(this T textBlock, ObservableValue<TSource> source,
Func<TSource, string> convert)
where T : TextBlock
parameter description
T Text block type.
TSource Source value type.
textBlock Target text block.
source Observable source.
convert Source-to-text converter.

The text block for chaining.