Commit 5360393d authored by Tebjan Halm's avatar Tebjan Halm
Browse files

now also parses custom attributes

parent b3efffda
......@@ -164,7 +164,7 @@ namespace Svg
}
else
{
properties = TypeDescriptor.GetProperties(element.GetType(), new[] { new SvgAttributeAttribute(attributeName) });
properties = TypeDescriptor.GetProperties(elementType, new[] { new SvgAttributeAttribute(attributeName) });
_propertyDescriptors.Add(elementType, new Dictionary<string, PropertyDescriptorCollection>());
_propertyDescriptors[elementType].Add(attributeName, properties);
......@@ -183,6 +183,11 @@ namespace Svg
Trace.TraceWarning(string.Format("Attribute '{0}' cannot be set - type '{1}' cannot convert from string '{2}'.", attributeName, descriptor.PropertyType.FullName, attributeValue));
}
}
else
{
//attribute is not a svg attribute, store it in custom attributes
element.CustomAttributes[attributeName] = attributeValue;
}
}
/// <summary>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment