RadSvgImage
Represents a scalable vector graphics (SVG) image that can be rendered at different sizes with high quality.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
[TypeConverter(typeof(SvgImageTypeConverter))]
public class RadSvgImage : MarshalByRefObject, ISerializable, ICloneable, IDisposable
Inheritance: objectMarshalByRefObjectRadSvgImage
Implements:
Inherited Members
Constructors
This constructor is called during the deserialization process. https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable?view=netframework-2.0
protected RadSvgImage(SerializationInfo info, StreamingContext context)
Properties
Gets or sets a value indicating whether to allow caching of the SVG image. When set to true, the image can be cached to improve performance on subsequent loads.
public static bool AllowCache { get; set; }
true if caching is allowed; otherwise, false.
Document
SvgDocument
Gets or sets the SVG document associated with this instance.
[CLSCompliant(false)]
public SvgDocument Document { get; }
Gets or sets the default height of the SVG image. Note that if you set negative value or null, the default height of the SvgDocument will be returned when accessing the property.
public int Height { get; set; }
Gets or sets the default size of the SVG image. If this property is not modified it takes the value from the SvgDocument.
public Size Size { get; set; }
Methods
Clears all cached raster images.
public virtual void ClearCache()
Creates a new instance of the current RadSvgImage by cloning its properties.
public object Clone()
A new RadSvgImage object that is a copy of the original instance.
Implements:
Deserializes a string representation of an SVG image into a RadSvgImage object.
public static RadSvgImage Deserialize(string encodedImage)
The XML string representation containing the SVG image data to be deserialized.
Returns:A RadSvgImage object that represents the deserialized SVG image.
Releases the resources used by the RadSvgImage instance.
public void Dispose()
Implements:
This method overrides the Dispose method to clean up resources used by the RadSvgImage. It should be called when the object is no longer needed to free up system resources.
Creates a RadSvgImage from the specified byte array.
public static RadSvgImage FromByteArray(byte[] bytes)
A byte array that contains the data for this RadSvgImage.
Returns:The RadSvgImage this method creates.
Creates a RadSvgImage from the specified file.
public static RadSvgImage FromFile(string filename)
A string that contains the name of the file from which to create the RadSvgImage.
Returns:The RadSvgImage this method creates.
Creates a RadSvgImage from the specified data stream.
public static RadSvgImage FromStream(Stream stream)
A Stream that contains the data for this RadSvgImage.
Returns:The RadSvgImage this method creates.
Creates a RadSvgImage from the specified XML string.
Returns a raster Bitmap by given width and height for the loaded SVG document.
Serializes the specified RadSvgImage into a format suitable for storage or transmission.
public static string Serialize(RadSvgImage svgImage)
The RadSvgImage instance to be serialized.
Returns:A string that represents the serialized form of the provided RadSvgImage.
Converts the current instance of the RadSvgImage class to its equivalent string representation.
public override string ToString()
A string that represents the current RadSvgImage object.
Overrides: