corelibraries-devexpress-dot-utils-dot-svg-c15e530a.md
A raster image created from a vector icon.
Namespace : DevExpress.Utils.Svg
Assembly : DevExpress.Drawing.v25.2.dll
NuGet Package : DevExpress.Drawing
public class SvgBitmap :
ISvgBitmap
Public Class SvgBitmap
Implements ISvgBitmap
The following members return SvgBitmap objects:
| Library | Related API Members |
|---|---|
| Cross-Platform Class Library | SvgBitmap.Create(Size) |
| SvgBitmap.Create(SvgImage) | |
| SvgBitmap.FromFile(String) | |
| SvgBitmap.FromStream(Stream) | |
| WinForms Controls | DXErrorProvider.GetSvgErrorIcon(String) |
| PivotGridControl.GetKPISvgBitmap(PivotKPIGraphic, Int32) |
The SvgBitmap class allows you to create an image from an SVG icon and display it within third-party controls or DevExpress controls that do not support vector icons.
The following sample code demonstrates how to create an image from the specified vector icon and display it within the Button control.
using DevExpress.Utils.Svg;
SvgBitmap image;
// Loads a vector icon from a file.
image = SvgBitmap.FromFile(@"d:\i\timer.svg");
/* Creates and assigns a raster image.
* The image is 1.2 times larger than the original vector icon.
*/
button1.Image = image.Render(null, 1.2);
button1.ImageAlign = ContentAlignment.MiddleLeft;
Imports DevExpress.Utils.Svg
Private image As SvgBitmap
' Loads a vector icon from a file.
image = SvgBitmap.FromFile("d:\i\timer.svg")
' Creates and assigns a raster image.
' The image is 1.2 times larger than the original vector icon.
button1.Image = image.Render(Nothing, 1.2)
button1.ImageAlign = ContentAlignment.MiddleLeft
Object SvgBitmap
See Also