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
svgFileNamestringThe 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
svgFileNameis null.- ArgumentException
If the
svgFileNameis empty.-or-
If thesvgFileNamedoes not exists.
Read(Uri)
Reads in the specified SVG file and converts it to WPF drawing.
public DrawingGroup Read(Uri svgUri)
Parameters
Returns
- DrawingGroup
This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.
Exceptions
- ArgumentNullException
If the
svgUriis null.
Read(Stream)
Reads in the specified SVG file stream and converts it to WPF drawing.
public DrawingGroup Read(Stream svgStream)
Parameters
svgStreamStreamThe source SVG file stream.
Returns
- DrawingGroup
This returns the DrawingGroup representing the SVG file, if successful; otherwise, it returns null.
Exceptions
- ArgumentNullException
If the
svgStreamis 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
svgTextReaderTextReaderA 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
svgTextReaderis null.
Read(XmlReader)
Reads in the specified source SVG file reader and converts it to WPF drawing.
public DrawingGroup Read(XmlReader svgXmlReader)
Parameters
svgXmlReaderXmlReaderAn 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
svgXmlReaderis 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
svgFileNamestringThe full path of the SVG source file.
destinationDirDirectoryInfoThe 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
svgFileNameis null.- ArgumentException
If the
svgFileNameis empty.-or-
If thesvgFileNamedoes not exists.