Back to Devexpress

SvgImage.FromResources(String, Assembly) Method

corelibraries-devexpress-dot-utils-dot-svg-dot-svgimage-dot-fromresources-x28-system-dot-string-system-dot-reflection-dot-assembly-x29.md

latest1.8 KB
Original Source

SvgImage.FromResources(String, Assembly) Method

Creates a new SvgImage object from a vector image stored in project resources.

Namespace : DevExpress.Utils.Svg

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public static SvgImage FromResources(
    string name,
    Assembly assembly
)
vb
Public Shared Function FromResources(
    name As String,
    assembly As Assembly
) As SvgImage

Parameters

NameTypeDescription
nameString

The name an icon has in resources.

| | assembly | Assembly |

The assembly name.

|

Returns

TypeDescription
SvgImage

A newly created SvgImage.

|

Remarks

The code below illustrates an example.

csharp
SvgImage img2 = SvgImage.FromResources("MyImage2.svg", typeof(mainForm).Assembly);
vb
Dim img2 As SvgImage = SvgImage.FromResources("MyImage2.svg", GetType(mainForm).Assembly)

See Also

SvgImage Class

SvgImage Members

DevExpress.Utils.Svg Namespace