Skip to content

ControlExtensions.Content method (1 of 7)

Sets the content element.

public static TabItem Content(this TabItem tab, Element content)
parameter description
tab Target tab item.
content Content element.

The tab item for chaining.

Sets: ContentControl.Content, TabItem.Content


Sets the button content to a centered text label. When accessKey is true (default), “_” prefixes mark access key characters (e.g., “_Save” registers Alt+S).

public static Button Content(this Button button, string text, bool accessKey = true)
parameter description
button Target button.
text Content text.
accessKey Whether underscore prefixes define access keys.

The button for chaining.


Sets the content to a text label. When accessKey is true (default), “_” prefixes mark access key characters (e.g., “_Remember me” registers Alt+R).

public static CheckBox Content(this CheckBox checkBox, string text, bool accessKey = true)
parameter description
checkBox Target check box.
text Content text.
accessKey Whether underscore prefixes define access keys.

The check box for chaining.


Sets the drop-down button content to a centered text label. When accessKey is true (default), “_” prefixes mark access key characters (e.g., “_Export” registers Alt+E).

public static DropDownButton Content(this DropDownButton button, string text, bool accessKey = true)
parameter description
button Target drop-down button.
text Content text.
accessKey Whether underscore prefixes define access keys.

The drop-down button for chaining.


Sets the split button content to a centered text label. When accessKey is true (default), “_” prefixes mark access key characters (e.g., “_Save” registers Alt+S).

public static SplitButton Content(this SplitButton button, string text, bool accessKey = true)
parameter description
button Target split button.
text Content text.
accessKey Whether underscore prefixes define access keys.

The split button for chaining.


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

public static ToggleButton Content(this ToggleButton toggleButton, string text,
bool accessKey = true)
parameter description
toggleButton Target toggle button.
text Content text.
accessKey Whether underscore prefixes define access keys.

The toggle button for chaining.


ControlExtensions.Content<T> method (7 of 7)

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

Sets the content to a text label. When accessKey is true (default), “_” prefixes mark access key characters (e.g., “_Save” registers Alt+S).

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

The control for chaining.