SvgSymbolOptionsElementsToDiscard Property
Gets or sets the elements to discard when converting
<svg> tag to
<symbol> tag or vice versa.
Wildcards can be used: * - Zero or more characters, ? - Exactly one character.
Default value is null which means preserve all elements set in ElementsToPreserve.
Elements that should be usually preserved inside <symbol> tag:
- <path> — most common for icons
- <circle>, <rect>, <line>, <polygon>, <polyline> — basic shapes
- <g> — groups of elements (preserve if used for structure or styling)
- <text> — if your icon includes text
- <use> — if referencing other symbols
- <defs> — only if it contains reusable elements like gradients or filters used inside the symbol
Namespace: DotMake.SvgSpriteAssembly: DotMake.SvgSprite (in DotMake.SvgSprite.dll) Version: 1.0.0
public string[] ElementsToDiscard { get; set; }
Property Value
String