Class SvgIconExtension
This implements a markup extension that enables the creation of DrawingImage from SVG sources.
public sealed class SvgIconExtension : SvgIconBase
- Inheritance
-
SvgIconExtension
- Inherited Members
Remarks
The SVG source file can be:
- From the web
- From the local computer (relative or absolute paths)
- From the resources.
The rendering settings are provided as properties for customizations.
Constructors
SvgIconExtension()
Initializes a new instance of the SvgIconExtension class with the default parameters.
public SvgIconExtension()
SvgIconExtension(string)
Initializes a new instance of the SvgIconExtension class with the specified SVG file path.
public SvgIconExtension(string svgPath)
Parameters
svgPathstring
Properties
Source
Gets or sets the SVG source file.
public string Source { get; set; }
Property Value
Methods
ProvideValue(IServiceProvider)
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.
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
serviceProviderIServiceProviderObject that can provide services for the markup extension.
Returns
- object
This returns DrawingImage if successful; otherwise, it returns null.