Manages images used in an XAF application.
For general guidelines on using images in an XAF application, refer to the Add and Override Images 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.
|ImageLoader.GetSmallImageInfo||Supplies metadata on an image used by ASP.NET Web Property Editors.|
|ImageLoader.GetImageInfo||Supplies metadata on a standard-sized image.|
|ImageLoader.GetLargeImageInfo||Supplies metadata on a large image.|
|ImageLoader.GetDialogImageInfo||Supplies metadata on an image used in dialog windows.|
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.
using System.Drawing; //... Image customer = ImageLoader.Instance.GetImageInfo("BO_Customer").Image;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ImageLoader class.
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.