As I have already sad - the myReaderSvg.Read returns the Viewbox that has PathGeometry, but the xaml that is returned by GetXaml will define all Paths as <Path Data="..." that is parsed by WPF as StreamGeometry.
So if you need PathGeometry you will have to use ReaderSvg - it is not possible to get PathGeometry from the produced xaml.
I know the GetXaml method is not perfect, but it is much better than not having it (as in previous version) and use the WPF's XamlWriter that is useless in 80% of cases.
This is the actual code that I use to test the ReadPathAsPathGeometry property. Below is the sample svg file.
[Test]
public void ReadPathAsPathGeometryTest()
{
Viewbox testViewbox;
Ab2d.ReaderSvg testReaderSvg;
System.Windows.Shapes.Path firstPath;
string fileName;
fileName = GetTestFullFileName("my_flower.svg");
testReaderSvg = new Ab2d.ReaderSvg();
// default:
//testReaderSvg.ReadPathAsPathGeometry = false;
testViewbox = testReaderSvg.Read(fileName);
firstPath = ((System.Windows.Controls.Canvas)(((System.Windows.Controls.Canvas)(((System.Windows.Controls.Canvas)(testViewbox.Child)).Children[0])).Children[1])).Children[0] as System.Windows.Shapes.Path;
Assert.IsTrue((firstPath.Data is System.Windows.Media.StreamGeometry), "ReadPathAsPathGeometry = false: firstPath.Data not StreamGeometry!");
// set ReadPathAsPathGeometry = true;
testReaderSvg.ReadPathAsPathGeometry = true;
testViewbox = testReaderSvg.Read(fileName);
firstPath = ((System.Windows.Controls.Canvas)(((System.Windows.Controls.Canvas)(((System.Windows.Controls.Canvas)(testViewbox.Child)).Children[0])).Children[1])).Children[0] as System.Windows.Shapes.Path;
Assert.IsTrue((firstPath.Data is System.Windows.Media.PathGeometry), "ReadPathAsPathGeometry = true: firstPath.Data not PathGeometry!");
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_svg "
http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "
http://www.w3.org/1999/xlink">
]>
<svg version="1.1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="361" height="336" viewBox="0 0 361 336"
overflow="visible" enable-background="new 0 0 361 336" xml:space="preserve">
<g id="Layer_2">
<rect x="0.5" y="0.5" fill="#00A0C6" stroke="#71A3CC" width="360" height="335"/>
</g>
<g id="Layer_1">
<path fill="#FFFFFF" stroke="#000000" d="M184.571,94.848c7.98-1.378,31.817-31.869,42.871-20.767
c6.926,6.957-1.848,20.605-5.112,26.838c11.657-4.098,38.514-5.76,41.301,9.026c2.406,12.766-9.263,17.353-20.097,16.866
c4.639,5.106,11.585,7.435,14.208,15.254c2.135,6.366,3.662,23.554-2.337,28.336c-10.297,8.209-25.099-1.318-31.454-9.564
c0.229,13.991-3.318,26.114-19.434,29.277c-13.128,2.577-24.89-7.365-23.854-20.799c-14.034,10.547-35.176,36.956-48.896,14.945
c-7.719-12.383-7.054-29.245,7.45-33.619c-11.562-4.83-31.747-3.836-34.965-19.721c-3.651-18.026,22.259-14.507,33.183-11.949
c1.13-11.899-19.356-53.61,5.563-50.823C165.07,70.618,175,96.5,184.571,94.848z"/>
<path fill="#FFFF00" stroke="#000000" d="M164.5,138c-24.5-35,40.827-37.726,41.345-11.324c0.842,42.97-44.178,7.963-40.675,12.053
L164.5,138z"/>
<path fill="#307C1F" stroke="#000000" d="M218.5,181.5c1.218,5.095,5.105,10.965,7.587,15.477
c3.967,7.211,8.795,13.624,13.3,20.536c8.889,13.637,20.17,26.876,25.527,42.124c5.028,14.312,4.585,29.683,4.585,44.986
c0,9.871,0.599,20.098,0.424,29.801c-2.569,0.13-8.054,1.184-8.924-1.424h-0.5c-0.565-7.235-0.095-14.484-0.488-21.74
c-1.086-20.01-11.136-39.996-17.4-58.747c-5.023-15.036-10.438-28.501-17.988-41.961c-3.964-7.067-11.438-14.809-11.123-23.052
L218.5,181.5z"/>
</g>
</svg>
Andrej