DXImageHelper.GetImageSource(String, ImageSize, ImageType) Method
In This Article
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. |
image |
DevExpress. |
A predefined image size. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
image |
DevExpress. |
Colored | A predefined image type. |
#Returns
Type | Description |
---|---|
Image |
An 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