Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXImageHelper.GetImageSource(String, ImageSize, ImageType) Method

Retrieves the specified image from the library.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public static ImageSource GetImageSource(
    string id,
    ImageSize imageSize,
    ImageType imageType = ImageType.Colored
)

#Parameters

Name Type Description
id String

An image identifier.

imageSize DevExpress.Utils.Design.ImageSize

A predefined image size.

#Optional Parameters

Name Type Default Description
imageType DevExpress.Utils.Design.ImageType Colored

A predefined image type.

#Returns

Type Description
ImageSource

An ImageSource object that is the retrieved image.

#Remarks

See the example below.

var image = DXImageHelper.GetImageSource("Chart", ImageSize.Size16x16, ImageType.Office2013);

Note

Obtaining an image by its ID works only if this image exists in all image sets.

Refer to the DevExpress Image Gallery topic to learn more.

See Also