Back to Devexpress

SvgImageCollection.FromResources(String, Assembly) Method

windowsforms-devexpress-dot-utils-dot-svgimagecollection-dot-fromresources-x28-system-dot-string-system-dot-reflection-dot-assembly-x29.md

latest3.5 KB
Original Source

SvgImageCollection.FromResources(String, Assembly) Method

Generates a new SvgImageCollection instance filled with images from a project assembly.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

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

Parameters

NameTypeDescription
resourceBaseNameString

A String value that specifies the path to assembly images within a project.

| | assembly | Assembly |

An Assembly that contains the target embedded resource images.

|

Returns

TypeDescription
SvgImageCollection

A SvgImageCollection object that contains images from a project assembly.

|

Remarks

The code below illustrates how to initialize a collection that stores vector images, located under the “WindowsFormsApp1\Images” folder. Note that in VB.NET you should specify the root folder name only, while in C# the full path name is required.

csharp
SvgImageCollection collection = SvgImageCollection.FromResources("WindowsFormsApp1.Images", typeof(Form3).Assembly);
vb
Dim collection As SvgImageCollection = SvgImageCollection.FromResources("WindowsFormsApp1", GetType(Form3).Assembly)

See the SvgImageCollection class description to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FromResources(String, Assembly) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-chat-for-net-framework/CS/DevExpress.AI.WinForms.HtmlChat/Resources/Style.cs#L58

csharp
static SvgChatImages() {
    SvgImages = SvgImageCollection.FromResources("DevExpress.AI.WinForms.HtmlChat.Resources.Svg", typeof(SvgChatImages).Assembly);
}

See Also

SvgImageCollection Class

SvgImageCollection Members

DevExpress.Utils Namespace