Table of Contents

Method LoadAsync

Namespace
SharpVectors.Converters
Assembly
SharpVectors.Converters.Wpf.dll

LoadAsync(Uri)

This sets the source SVG for a SvgControl by using the supplied Uniform Resource Identifier (URI) and processing the result asynchronously.

public Task<bool> LoadAsync(Uri uriSource)

Parameters

uriSource Uri

A reference to the SVG source file.

Returns

Task<bool>

A value that indicates whether the operation was successful. This is true if successful, otherwise, it is false.

LoadAsync(Stream, bool)

This sets the source SVG for a SvgControl by accessing a stream and processing the result asynchronously.

public Task<bool> LoadAsync(Stream streamSource, bool useCopyStream = true)

Parameters

streamSource Stream

The stream source that sets the SVG source value.

useCopyStream bool

A value specifying whether to use a copy of the stream. The default is true, the SVG source stream is copied, rendered and stored.

Returns

Task<bool>

A value that indicates whether the operation was successful. This is true if successful, otherwise, it is false.

Remarks

The control will by default create a copy of the source stream to prevent any effect of disposing. If the source stream is stored, then use the useCopyStream to prevent the control from creating its own copy.