Table of Contents

Method Read

Namespace
SharpVectors.Converters
Assembly
SharpVectors.Converters.Wpf.dll

Read(string)

Reads in the specified SVG file and converts it to WPF drawing.

public DrawingGroup Read(string svgFileName)

Parameters

svgFileName string

The full path of the SVG source file.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgFileName is null.

ArgumentException

If the svgFileName is empty.

-or-

If the svgFileName does not exists.

Read(Uri)

Reads in the specified SVG file and converts it to WPF drawing.

public DrawingGroup Read(Uri svgUri)

Parameters

svgUri Uri

A Uri specifying the path to the SVG file.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgUri is null.

Read(Stream)

Reads in the specified SVG file stream and converts it to WPF drawing.

public DrawingGroup Read(Stream svgStream)

Parameters

svgStream Stream

The source SVG file stream.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgStream is null.

Read(TextReader)

Reads in the specified source from the SVG file reader and converts it to WPF drawing.

public DrawingGroup Read(TextReader svgTextReader)

Parameters

svgTextReader TextReader

A text reader providing access to the SVG file data.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgTextReader is null.

Read(XmlReader)

Reads in the specified source SVG file reader and converts it to WPF drawing.

public DrawingGroup Read(XmlReader svgXmlReader)

Parameters

svgXmlReader XmlReader

An XML reader providing access to the SVG file data.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgXmlReader is null.

Read(string, DirectoryInfo)

Reads in the specified SVG file, converting it to WPF drawing and saving the results to the specified directory if successful.

public DrawingGroup Read(string svgFileName, DirectoryInfo destinationDir)

Parameters

svgFileName string

The full path of the SVG source file.

destinationDir DirectoryInfo

The destination of the output XAML file, if the saving properties are enabled.

Returns

DrawingGroup

This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.

Exceptions

ArgumentNullException

If the svgFileName is null.

ArgumentException

If the svgFileName is empty.

-or-

If the svgFileName does not exists.