Skip to content

ControlExtensions.BindContent method (1 of 14)

Binds the button content to an observable string value (creates a centered text label).

public static Button BindContent(this Button button, ObservableValue<string> source,
bool accessKey = true)
parameter description
button Target button.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The button for chaining.

Sets: ContentControl.Content


ControlExtensions.BindContent method (2 of 14)

Section titled “ControlExtensions.BindContent method (2 of 14)”

Binds the content to an observable text label. When accessKey is true (default), “_” prefixes mark access key characters and stay in sync as the source changes.

public static CheckBox BindContent(this CheckBox checkBox, ObservableValue<string> source,
bool accessKey = true)
parameter description
checkBox Target check box.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The check box for chaining.


ControlExtensions.BindContent method (3 of 14)

Section titled “ControlExtensions.BindContent method (3 of 14)”

Binds the drop-down button content to an observable string value (creates a centered text label).

public static DropDownButton BindContent(this DropDownButton button,
ObservableValue<string> source, bool accessKey = true)
parameter description
button Target drop-down button.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The drop-down button for chaining.


ControlExtensions.BindContent method (4 of 14)

Section titled “ControlExtensions.BindContent method (4 of 14)”

Binds the split button content to an observable string value (creates a centered text label).

public static SplitButton BindContent(this SplitButton button, ObservableValue<string> source,
bool accessKey = true)
parameter description
button Target split button.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The split button for chaining.


ControlExtensions.BindContent method (5 of 14)

Section titled “ControlExtensions.BindContent method (5 of 14)”

Binds the content to an observable text label (centered). When accessKey is true (default), “_” prefixes mark access key characters and stay in sync as the source changes.

public static ToggleButton BindContent(this ToggleButton toggleButton,
ObservableValue<string> source, bool accessKey = true)
parameter description
toggleButton Target toggle button.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The toggle button for chaining.


ControlExtensions.BindContent<T> method (6 of 14)

Section titled “ControlExtensions.BindContent<T> method (6 of 14)”

Binds the button content element to an observable value.

public static T BindContent<T>(this T button, ObservableValue<Element?> source)
where T : Button
parameter description
button Target button.
source Observable source.

The button for chaining.


ControlExtensions.BindContent<T> method (7 of 14)

Section titled “ControlExtensions.BindContent<T> method (7 of 14)”

Binds the content to an observable text label. When accessKey is true (default), “_” prefixes mark access key characters and stay in sync as the source changes.

public static T BindContent<T>(this T control, ObservableValue<string> source,
bool accessKey = true)
where T : ToggleBase
parameter description
T Toggle control type.
control Target toggle control.
source Observable source.
accessKey Whether underscore prefixes define access keys.

The control for chaining.


ControlExtensions.BindContent<TSource> method (8 of 14)

Section titled “ControlExtensions.BindContent<TSource> method (8 of 14)”

Binds the button content to a converted observable value (creates a centered text label).

public static Button BindContent<TSource>(this Button button, ObservableValue<TSource> source,
Func<TSource, string> convert, bool accessKey = true)
parameter description
TSource Source value type.
button Target button.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The button for chaining.


ControlExtensions.BindContent<TSource> method (9 of 14)

Section titled “ControlExtensions.BindContent<TSource> method (9 of 14)”

Binds the content to a converted observable text label. When accessKey is true (default), “_” prefixes in the converted text mark access key characters.

public static CheckBox BindContent<TSource>(this CheckBox checkBox,
ObservableValue<TSource> source, Func<TSource, string> convert, bool accessKey = true)
parameter description
TSource Source value type.
checkBox Target check box.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The check box for chaining.


ControlExtensions.BindContent<TSource> method (10 of 14)

Section titled “ControlExtensions.BindContent<TSource> method (10 of 14)”

Binds the drop-down button content to a converted observable value (creates a centered text label).

public static DropDownButton BindContent<TSource>(this DropDownButton button,
ObservableValue<TSource> source, Func<TSource, string> convert, bool accessKey = true)
parameter description
TSource Source value type.
button Target drop-down button.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The drop-down button for chaining.


ControlExtensions.BindContent<TSource> method (11 of 14)

Section titled “ControlExtensions.BindContent<TSource> method (11 of 14)”

Binds the split button content to a converted observable value (creates a centered text label).

public static SplitButton BindContent<TSource>(this SplitButton button,
ObservableValue<TSource> source, Func<TSource, string> convert, bool accessKey = true)
parameter description
TSource Source value type.
button Target split button.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The split button for chaining.


ControlExtensions.BindContent<TSource> method (12 of 14)

Section titled “ControlExtensions.BindContent<TSource> method (12 of 14)”

Binds the content to a converted observable text label (centered). When accessKey is true (default), “_” prefixes in the converted text mark access key characters.

public static ToggleButton BindContent<TSource>(this ToggleButton toggleButton,
ObservableValue<TSource> source, Func<TSource, string> convert, bool accessKey = true)
parameter description
TSource Source value type.
toggleButton Target toggle button.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The toggle button for chaining.


ControlExtensions.BindContent<T,TSource> method (13 of 14)

Section titled “ControlExtensions.BindContent<T,TSource> method (13 of 14)”

Binds the button content element to a converted observable value.

public static T BindContent<T, TSource>(this T button, ObservableValue<TSource> source,
Func<TSource, Element?> convert)
where T : Button
parameter description
T Button type.
TSource Source value type.
button Target button.
source Observable source.
convert Source-to-element converter.

The button for chaining.


ControlExtensions.BindContent<T,TSource> method (14 of 14)

Section titled “ControlExtensions.BindContent<T,TSource> method (14 of 14)”

Binds the content to a converted observable text label. When accessKey is true (default), “_” prefixes in the converted text mark access key characters.

public static T BindContent<T, TSource>(this T control, ObservableValue<TSource> source,
Func<TSource, string> convert, bool accessKey = true)
where T : ToggleBase
parameter description
T Toggle control type.
TSource Source value type.
control Target toggle control.
source Observable source.
convert Source-to-text converter.
accessKey Whether underscore prefixes define access keys.

The control for chaining.