mntone / SvgForXaml

Draw SVG image with Win2D
MIT License
94 stars 18 forks source link

ArgumentException: An item with the same key has already been added. #5

Closed ILAgent closed 8 years ago

ILAgent commented 8 years ago

Hi. I have that issue. Code: var file = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///Resources/Images/SuggestCathegory/search_suggest_category_atm.svg")); await this.SvgControl.LoadFileAsync(file);

The svg file in the attach. search_suggest_category_atm.zip

mntone commented 8 years ago

Hi. I’m sorry for late reply.

I check this svg file. I am worried about duplicate id.

<rect id="Rectangle-1493" x="3" y="3" width="12" height="2" rx="1"></rect> <rect id="Rectangle-1493" x="7" y="3" width="2" height="13"></rect>

ID is the unique value.

A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. (https://www.w3.org/TR/REC-xml/#sec-attribute-types)

However, I handle this problem, in case.

ILAgent commented 8 years ago

Thank you !