SvgAttributeCollection Class

Definition

Show inherited members (46)

Svg.Custom override of the upstream attribute collection.

The upstream implementation returns the exact same deferred paint server instance when an inheritable property such as fill="currentColor" flows from a parent element to a child. That is usually fine for concrete colors, but it breaks once the deferred server has cached the parent's computed color: descendants that override color keep rendering with the parent's color instead of resolving currentColor for themselves.

We keep the original inheritance logic intact and only clone inherited deferred currentColor paint servers. Direct properties, such as filter primitives with lighting-color="currentColor", still resolve against the element that declared the property, while inherited paint still gets a fresh per-consumer resolution context.

public sealed class SvgAttributeCollection : Dictionary<string, object>, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable
Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (1)

Properties (1)

Methods (2)

Events (1)