Skip to content

ControlMarkupExtensions.StyleName<T> method

Sets the named style key, resolved from the nearest StyleSheet up the tree and taking priority over StyleSheet type rules and the theme style.

public static T StyleName<T>(this T target, string? value)
where T : Control
parameter description
T Receiver type.
target Target Control.
value Value assigned to StyleName.

The same element for chaining.

Sets: Control.StyleName