Click or drag to resize
CanvasSvgDocumentLoadFromXml Method
[Win10_15063] Loads an SVG document from a string.

Namespace:  Microsoft.Graphics.Canvas.Svg
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasSvgDocument LoadFromXml(
	ICanvasResourceCreator resourceCreator,
	string xmlString
)

Parameters

resourceCreator
Type: Microsoft.Graphics.CanvasICanvasResourceCreator
xmlString
Type: SystemString

Return Value

Type: CanvasSvgDocument
Remarks

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

The passed-in string must be a valid SVG document. Currently, Win2D supports a subset of SVG 1.1. For more details, see Direct2D's page about SVG support. Content which is valid SVG but is unsupported by Win2D will not cause a failure; it will be ignored.

See Also