Method Load
- Namespace
- SharpVectors.Converters
- Assembly
- SharpVectors.Converters.Wpf.dll
Load(Uri, bool)
This sets the source SVG for a SvgCanvas by using the supplied Uniform Resource Identifier (URI) and optionally processing the result asynchronously.
public bool Load(Uri uriSource, bool useAsync = false)
Parameters
uriSource
UriA reference to the SVG source file.
useAsync
boolA value indicating whether to process the result asynchronously. The default value is false, the SVG conversion is processed synchronously.
Returns
- bool
A value that indicates whether the operation was successful. This is true if successful, otherwise, it is false.
Load(string, bool)
This sets the source SVG for a SvgCanvas by accessing text content and optionally processing the result asynchronously.
public bool Load(string svgSource, bool useAsync = false)
Parameters
svgSource
stringThe stream source that sets the SVG source value.
useAsync
boolA value indicating whether to process the result asynchronously. The default value is false, the SVG conversion is processed synchronously.
Returns
- bool
A value that indicates whether the operation was successful. This is true if successful, otherwise, it is false.
Load(Stream, bool, bool)
This sets the source SVG for a SvgCanvas by accessing a stream and optionally processing the result asynchronously.
public bool Load(Stream streamSource, bool useCopyStream = true, bool useAsync = false)
Parameters
streamSource
StreamThe stream source that sets the SVG source value.
useCopyStream
boolA value specifying whether to use a copy of the stream. The default is true, the SVG source stream is copied, rendered and stored.
useAsync
boolA value indicating whether to process the result asynchronously. The default value is false, the SVG conversion is processed synchronously.
Returns
- 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.