SvgSymbolOptionsElementsToPreserve Property

Gets or sets the attributes to preserve when converting <svg> tag to <symbol> tag or vice versa.

Wildcards can be used: * - Zero or more characters, ? - Exactly one character.

Default value is { "*" }.

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

Definition

Namespace: DotMake.SvgSprite
Assembly: DotMake.SvgSprite (in DotMake.SvgSprite.dll) Version: 1.0.0
C#
public string[] ElementsToPreserve { get; set; }

Property Value

String

See Also