You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can get your demo code working fine with the logo.svg which is included, but when I swap that for an svg of my own which has multiple path elements I get an unhandled exception.
Is there any way to get this to work with svg's of this type?
thanks
{System.NotSupportedException: Path Operation l
at NGraphics.SvgReader.ReadPath (NGraphics.Path p, System.String pathDescriptor) [0x00456] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:600
at NGraphics.SvgReader.AddElement (System.Collections.Generic.IList1[T] list, System.Xml.Linq.XElement e, NGraphics.Pen inheritPen, NGraphics.Brush inheritBrush) [0x00549] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:153 at NGraphics.SvgReader.AddElements (System.Collections.Generic.IList1[T] list, System.Collections.Generic.IEnumerable`1[T] es, NGraphics.Pen inheritPen, NGraphics.Brush inheritBrush) [0x00013] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:75
at NGraphics.SvgReader.Read (System.Xml.Linq.XDocument doc) [0x0017d] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:69
at NGraphics.SvgReader..ctor (System.IO.TextReader reader, System.Double pixelsPerInch) [0x00073] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:24
at TwinTechsForms.NControl.SvgImageView.LoadSvgFromResource () [0x00054] in <43d13f3a47c046caadaa5f7e83049230>:0
at TwinTechsForms.NControl.SvgImageView.OnPropertyChanged (System.String propertyName) [0x00031] in <43d13f3a47c046caadaa5f7e83049230>:0
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:593
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390
at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174
at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:77
at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Binding.cs:126
at Xamarin.Forms.BindableObject.ApplyBindings (System.Boolean skipBindingContext) [0x0003b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:421
at Xamarin.Forms.BindableObject.ApplyBindings () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:125
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x0005a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:119
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.TemplatedPage.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00008] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedPage.cs:35
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.Page.OnBindingContextChanged () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Page.cs:206
at Xamarin.Forms.ContentPage.OnBindingContextChanged () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ContentPage.cs:16
at Xamarin.Forms.BindableObject.BindingContextPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0000e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:441
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00108] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:596
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:543
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:83
at Xamarin.Forms.BindableObject.set_BindingContext (System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:24
at CCGrantTracker.SimpleLoginPage..ctor () [0x00013] in D:\Source\cc-mobile-app\CCGrantTracker\Views\Logins\SimpleLoginPage.xaml.cs:24 }
The text was updated successfully, but these errors were encountered:
damion-daly
changed the title
demo code not working with a different svg
demo code not working svg with multiple path elements
Dec 19, 2017
Hi there,
I can get your demo code working fine with the logo.svg which is included, but when I swap that for an svg of my own which has multiple path elements I get an unhandled exception.
Is there any way to get this to work with svg's of this type?
thanks
{System.NotSupportedException: Path Operation l
at NGraphics.SvgReader.ReadPath (NGraphics.Path p, System.String pathDescriptor) [0x00456] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:600
at NGraphics.SvgReader.AddElement (System.Collections.Generic.IList
1[T] list, System.Xml.Linq.XElement e, NGraphics.Pen inheritPen, NGraphics.Brush inheritBrush) [0x00549] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:153 at NGraphics.SvgReader.AddElements (System.Collections.Generic.IList
1[T] list, System.Collections.Generic.IEnumerable`1[T] es, NGraphics.Pen inheritPen, NGraphics.Brush inheritBrush) [0x00013] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:75at NGraphics.SvgReader.Read (System.Xml.Linq.XDocument doc) [0x0017d] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:69
at NGraphics.SvgReader..ctor (System.IO.TextReader reader, System.Double pixelsPerInch) [0x00073] in /Users/fak/Dropbox/Projects/NGraphics/NGraphics/SvgReader.cs:24
at TwinTechsForms.NControl.SvgImageView.LoadSvgFromResource () [0x00054] in <43d13f3a47c046caadaa5f7e83049230>:0
at TwinTechsForms.NControl.SvgImageView.OnPropertyChanged (System.String propertyName) [0x00031] in <43d13f3a47c046caadaa5f7e83049230>:0
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:593
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390
at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x001f9] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:174
at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindingExpression.cs:77
at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Binding.cs:126
at Xamarin.Forms.BindableObject.ApplyBindings (System.Boolean skipBindingContext) [0x0003b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:421
at Xamarin.Forms.BindableObject.ApplyBindings () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:125
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x0005a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:119
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\View.cs:99
at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Grid.cs:139
at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00060] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:120
at Xamarin.Forms.Element.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:498
at Xamarin.Forms.TemplatedPage.SetChildInheritedBindingContext (Xamarin.Forms.Element child, System.Object context) [0x00008] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TemplatedPage.cs:35
at Xamarin.Forms.Element.OnBindingContextChanged () [0x00021] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:341
at Xamarin.Forms.Page.OnBindingContextChanged () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Page.cs:206
at Xamarin.Forms.ContentPage.OnBindingContextChanged () [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\ContentPage.cs:16
at Xamarin.Forms.BindableObject.BindingContextPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0000e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:441
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00108] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:596
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:390
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:543
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:83
at Xamarin.Forms.BindableObject.set_BindingContext (System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:24
at CCGrantTracker.SimpleLoginPage..ctor () [0x00013] in D:\Source\cc-mobile-app\CCGrantTracker\Views\Logins\SimpleLoginPage.xaml.cs:24 }
The text was updated successfully, but these errors were encountered: