Density-Independent Pixels
Important
This documentation topic describes legacy technology. We no longer develop new functionality for the Grid
The DevExpress GridControl specifies all dimensions in density-independent pixels (dp). Examples of properties accepting these units include: GridControl.RowHeight, GridColumn.MinWidth and SwipeButtonInfo.Width.
Density-independent pixels are relative units. On 160 DPI displays, one 1dp is equivalent to 1 physical pixel (px). On displays with higher DPI settings, the number of pixels in 1dp will increase proportionally, thus producing a sharper image while preserving element size and layout.
To determine the number of pixels in 1dp on a particular screen, divide the screen’s DPI by 160. The following table lists the results for a few common DPI settings.
Display Density | 1 dp equals to |
---|---|
120 dpi (ldpi) | 0. |
160 dpi (mdpi) | 1 px |
240 dpi (hdpi) | 1. |
320 dpi (xhdpi) | 2 px |
480 dpi (xxhdpi) | 3 px |
640 dpi (xxxhdpi) | 4 px |