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
stringThe 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 thesvgFileName
does 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
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
StreamThe 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
TextReaderA 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
XmlReaderAn 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
stringThe full path of the SVG source file.
destinationDir
DirectoryInfoThe 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 thesvgFileName
does not exists.