Back to Devexpress

ImageLoader Class

expressappframework-devexpress-dot-expressapp-dot-utils-7f11cb33.md

latest2.7 KB
Original Source

ImageLoader Class

Manages images used in an XAF application.

Namespace : DevExpress.ExpressApp.Utils

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public class ImageLoader
vb
Public Class ImageLoader

The following members return ImageLoader objects:

Remarks

For general guidelines on using images in an XAF application, refer to the Add and Replace Icons help topic.

The ImageLoader class exposes methods that retrieve metadata on images used in the application. Since XAF uses images of four standard sizes, ImageLoader exposes four methods dealing with images of a particular size. The following table lists them.

MethodDescription
ImageLoader.GetImageInfoSupplies metadata on a standard-sized image.
ImageLoader.GetLargeImageInfoSupplies metadata on a large image.
ImageLoader.GetDialogImageInfoSupplies metadata on an image used in dialog windows.

Note

All the methods above take the case-insensitive imageName parameter.

ImageLoader is a singleton. So, only a single instance of the ImageLoader class can be instantiated in an application. To invoke ImageLoader‘s instance methods, you need to use the ImageLoader instance, accessible via the ImageLoader.Instance property. The following code snippet illustrates this. The code retrieves the BO_Customer image using the GetImageInfo method.

csharp
using System.Drawing;
//...
var customer = ImageLoader.Instance.GetImageInfo("BO_Customer").Image;

Inheritance

Object ImageLoader

See Also

ImageLoader Members

DevExpress.ExpressApp.Utils Namespace