A newer version of this page is available. Switch to the current version.

ImageCollection.GetImageSize Event

When the ImageCollection.IsDpiAware option is enabled, the GetImageSize event allows you to customize the size of images returned by the ImageCollection. This event is fired on finishing an ImageCollection object initialization.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v19.2.dll


public event ImageCollectionGetImageSizeEventHandler GetImageSize

Event Data

The GetImageSize event's data class is DevExpress.Utils.ImageCollectionGetImageSizeEventArgs.


This event is in effect when the ImageCollection.IsDpiAware option is set to True.

In normal DPI mode (96DPI), the size of images in the ImageCollection is specified by the ImageCollection.ImageSize property. When DPI is set to higher values, the images are scaled accordingly. For instance, the 120DPI setting corresponds to the scale factor of 1.25. If the ImageSize property is set to (16,16), the actual image size in 120DPI will be (20,20).

The GetImageSize event allows you to specify a custom image size for various DPI settings. The current DPI setting is returned by the event's Dpi parameter. To provide a custom image size, use the SetScaleFactor method provided by the event's argument. The default scale factor is identified by the event's ScaleFactor property.

See Also