Click or drag to resize
AB4D logo

ReaderSvgRead Method (String)

Reads svg or svgz file from file system or from online source. The file is read as Shapes (Canvas, Path, Ellipse, etc.).

Namespace:  Ab2d
Assembly:  Ab2d.ReaderSvg (in Ab2d.ReaderSvg.dll) Version: 7.1.7295.1040
Syntax
C#
public Viewbox Read(
	string url
)

Parameters

url
Type: SystemString
url of file name of the svg file

Return Value

Type: Viewbox
Viewbox with elements defined in svg file
Examples

The following sample loads the mySample.svg file and adds it to the myStackPanel.

Viewbox sampleViewbox = Ab2d.ReaderSvg.Instance.Read(@"c:\mySample.svg");
myStackPanel.Children.Add(sampleViewbox);

The following sample loads the mySample.svg file from web site.

Ab2d.ReaderSvg myReaderSvg = new Ab2d.ReaderSvg();

Viewbox sampleViewbox = myReaderSvg.Read(@"http://www.myWeb.com/test/mySample.svg");
myStackPanel.Children.Add(sampleViewbox);
See Also