windowsforms-devexpress-dot-utils-dot-imagecollection.md
Gets or sets the value that specifies that when requesting an image from the ImageCollection, another DPI-specific image corresponding to the requested image is returned instead.
Namespace : DevExpress.Utils
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public virtual DefaultBoolean IsDpiAware { get; set; }
<DXCategory("Appearance")>
<DefaultValue(DefaultBoolean.Default)>
Public Overridable Property IsDpiAware As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
The DefaultBoolean.True value if a requested image is replaced with a DPI-specific image; DefaultBoolean.False or DefaultBoolean.Default if this feature is disabled.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
The ImageCollection allows you to provide different images (DPI-specific images) on displays having different DPI settings. This feature is enabled by the IsDpiAware property. The following tutorial shows how to set up the ImageCollection to support multiple DPI settings.
Add the images that correspond to different DPI settings to the project resources or a referenced library (see the ImageCollection class description to learn more). The names of the images (except for the image for the 96DPI) must have suffixes that specify the DPI settings to which the images correspond. The syntax is as follows:
Add an ImageCollection to the form and set its IsDpiAware property to True.
Add the normal images (that correspond to the 96DPI setting) from the project resources to the ImageCollection. To do this, select Choose Images from the ImageCollection Tasks pane. In the ImageCollection editor that will open, select Add->Load From Project Resources.
Assign the ImageCollection to a target control and apply the added normal image to the control or its visual element.
See Also