Back to Devexpress

ImageCollection<TImage, TInfo>.Add(String, String, Type) Method

windowsforms-devexpress-dot-utils-dot-imagecollection-2-dot-add-x28-system-dot-string-system-dot-string-system-dot-type-x29.md

latest2.0 KB
Original Source

ImageCollection<TImage, TInfo>.Add(String, String, Type) Method

Adds a resource image to this collection.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
public void Add(
    string key,
    string resourceName,
    Type resourceType
)
vb
Public Sub Add(
    key As String,
    resourceName As String,
    resourceType As Type
)

Parameters

NameTypeDescription
keyString

The name that the added image will have in this collection.

| | resourceName | String |

The image name as it appears in resources.

| | resourceType | Type |

The resource class type.

|

Remarks

The code below adss the “bo_attention” SVG image to the DevExpress.Utils.SvgImageCollection.

csharp
svgImageCollection1.Add("attention", "bo_attention", typeof(WindowsFormsApp1.Properties.Resources));
vb
svgImageCollection1.Add("attention", "bo_attention", GetType(WindowsFormsApp1.Properties.Resources))

See Also

ImageCollection<TImage, TInfo> Class

ImageCollection<TImage, TInfo> Members

DevExpress.Utils Namespace