SVGBuilderExtensions.Style

Style(this TBuilder, Action<RuleBuilder>)

Sets the ‘style’ attribute using a rule builder to define CSS styles.

public static TBuilder Style<TBuilder>(this TBuilder builder, Action<RuleBuilder> configureRule)
    where TBuilder : ISVGElementBuilder, ICoreAttributeSetter
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe SVG element builder.
configureRuleThe action to configure the CSS rule.

Return Value

The builder instance for chaining.

See Also


Style(this TBuilder, string)

Sets the ‘style’ attribute, defining inline CSS styles for the SVG element.

public static TBuilder Style<TBuilder>(this TBuilder builder, string rules)
    where TBuilder : ISVGElementBuilder, ICoreAttributeSetter
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe SVG element builder.
rulesThe CSS rules as a string.

Return Value

The builder instance for chaining.

See Also