Click or drag to resize
CanvasSvgDocumentLoadElementFromXml Method
[Win10_15063] Loads an SVG element from string containing an XML fragment.

Namespace:  Microsoft.Graphics.Canvas.Svg
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public CanvasSvgNamedElement LoadElementFromXml(
	string xmlString
)

Parameters

xmlString
Type: SystemString

Return Value

Type: CanvasSvgNamedElement
Remarks

This API is only available when running on Windows 10 build 15063 (Creators Update) or greater.

The passed-in string needs to be valid SVG XML. It should have one root node. It doesn't necessarily have to be a complete document, though.

After creation, the element is not automatically added to the tree. You can add it to the document tree, for example, using Root or AppendChild(ICanvasSvgElement). You can add an element to a document that isn't the one used to create it. Just, the document and the element need to share the same device.

See Also