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

This implements a markup extension that enables the creation of DrawingImage from SVG sources.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public sealed class RadSvgImageSourceExtension : RadSvgImageSourceExtensionBase

Inheritance: objectRadSvgImageSourceExtensionBaseRadSvgImageSourceExtension

Inherited Members RadSvgImageSourceExtensionBase.OverrideColorRadSvgImageSourceExtensionBase.CultureInfoRadSvgImageSourceExtensionBase.ApplicationName

Constructors

Initializes a new instance of the RadSvgImageSourceExtension class with the default parameters.

C#
public RadSvgImageSourceExtension()

Initializes a new instance of the RadSvgImageSourceExtension class with the specified SVG file path.

C#
public RadSvgImageSourceExtension(string svgPath)
Parameters:svgPathstring

Properties

Gets or sets the SVG source file.

C#
public string Source { get; set; }
Property Value:

A string specifying the path of the SVG source file. The default is null.

Methods

Performs the conversion of a valid SVG source file to the DrawingImage that is set as the value of the target property for this markup extension.

C#
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters:serviceProviderIServiceProvider

Object that can provide services for the markup extension.

Returns:

object

This returns DrawingImage if successful; otherwise, it returns null.