SVGBuilderExtensions.AddUse

AddUse<TBuilder>(this TBuilder, Action<SVGUseElementBuilder>)

Adds a ‘use’ element configuration to the builder.

public static TBuilder AddUse<TBuilder>(this TBuilder builder, 
    Action<SVGUseElementBuilder> configure)
    where TBuilder : ISVGElementBuilder, IStructuralElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder.
builderThe builder instance.
configureThe configuration action for the ‘use’ element.

Return Value

The builder instance for chaining.

See Also


AddUse<TBuilder>(this TBuilder, string, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<double, (double, LengthType)>, OneOf<Color, Paint, string>, OneOf<Color, Paint, string>, string, Action<SVGUseElementBuilder>)

Adds a ‘use’ element to the SVG builder, allowing for the reuse of an existing element defined elsewhere in the SVG.

public static TBuilder AddUse<TBuilder>(this TBuilder builder, string href = null, 
    OneOf<double, (double, LengthType)> x = null, OneOf<double, (double, LengthType)> y = null, 
    OneOf<double, (double, LengthType)> width = null, 
    OneOf<double, (double, LengthType)> height = null, OneOf<Color, Paint, string> fill = null, 
    OneOf<Color, Paint, string> stroke = null, string id = null, 
    Action<SVGUseElementBuilder> extend = null)
    where TBuilder : ISVGElementBuilder, ICompositeElementBuilder
ParameterDescription
TBuilderThe type of the SVG element builder, facilitating fluent API usage.
builderThe SVG builder instance to which the ‘use’ element will be added.
hrefThe reference to the existing element to be reused. Optional parameter.
xThe x-coordinate where the reused element is placed. Can be a double or a ValueTuple with LengthType. Optional parameter.
yThe y-coordinate where the reused element is placed. Can be a double or a ValueTuple with LengthType. Optional parameter.
widthThe width of the reused element. Can be a double or a ValueTuple with LengthType. Optional parameter.
heightThe height of the reused element. Can be a double or a ValueTuple with LengthType. Optional parameter.
fillThe fill color, paint or paint server id for the element. Optional parameter.
strokeThe stroke color, paint or paint server id for the element. Optional parameter.
idThe unique identifier for the element. Optional parameter.
extendAn optional action to further configure the SVGUseElementBuilder.

Return Value

The builder instance, allowing for method chaining.

See Also