New to Telerik UI for WinFormsStart a free 30-day trial

Provides utility methods for modifying the paint (fill/stroke) color of a RadSvgImage.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public static class TelerikSvgHelper

Inheritance: objectTelerikSvgHelper

Methods

Sets the fill color of the first SvgPath found in the specified image.

C#
public static bool SetFillColor(RadSvgImage svgImage, Color color)
Parameters:svgImageRadSvgImage

The image to modify.

colorColor

The fill color to apply.

Returns:

bool

true if the image was modified; otherwise, false.

Sets the fill color of the SvgElement instances returned by the specified selector.

C#
[CLSCompliant(false)]
public static bool SetFillColor(RadSvgImage svgImage, Func<RadSvgImage, IEnumerable<SvgElement>> selector, Color color)
Parameters:svgImageRadSvgImage

The image to modify.

selectorFunc<RadSvgImage, IEnumerable<SvgElement>>

A function returning the elements whose fill color should be updated. When null, the first SvgPath in the document is used.

colorColor

The fill color to apply.

Returns:

bool

true if the image was modified; otherwise, false.

Sets the stroke color of the first SvgPath found in the specified image.

C#
public static bool SetStrokeColor(RadSvgImage svgImage, Color color)
Parameters:svgImageRadSvgImage

The image to modify.

colorColor

The stroke color to apply.

Returns:

bool

true if the image was modified; otherwise, false.

Sets the stroke color of the SvgElement instances returned by the specified selector.

C#
[CLSCompliant(false)]
public static bool SetStrokeColor(RadSvgImage svgImage, Func<RadSvgImage, IEnumerable<SvgElement>> selector, Color color)
Parameters:svgImageRadSvgImage

The image to modify.

selectorFunc<RadSvgImage, IEnumerable<SvgElement>>

A function returning the elements whose stroke color should be updated. When null, the first SvgPath in the document is used.

colorColor

The stroke color to apply.

Returns:

bool

true if the image was modified; otherwise, false.