TdxBadgeBackground.FitMode Property
Specifies how the assigned image fills the UI adorner badge‘s background.
Declaration
property FitMode: TcxImageFitMode read; write; default ifmStretch;
Property Value
Type | Default |
---|---|
TcxImageFitMode | ifmStretch |
Remarks
In addition to the background image assigned by using the Glyph or ImageIndex property, the FitMode property affects the badge shape filled with a solid color:
Value | Description | Image Example | Solid Color Fill Example |
---|---|---|---|
ifmNormal | The background image is centered within the badge adorner without resizing. The image is clipped if its size exceeds the adorner’s dimensions. The assigned solid color fills the centered circle whose size corresponds to the default badge adorner’s dimensions. | ||
ifmStretch | The background image expands or shrinks to fill the entire badge adorner’s area without maintaining the original aspect ratio. The assigned solid color fills the rounded rectangle inscribed in the badge’s bounding rectangle. | ||
ifmProportionalStretch | The background image expands or shrinks to fill the entire badge adorner’s area retaining the original aspect ratio. The assigned solid color fills the rounded rectangle inscribed in the badge’s bounding rectangle. | ||
ifmFit | The background image is centered within the badge adorner. The image shrinks to fit the badge’s bounding rectangle (if necessary) while maintaining the original height-to-width ratio. The assigned solid color behaves in the same manner as in the ifmNormal mode. | ||
ifmFill | The background image is centered and upscaled to fill the entire badge adorner’s area. The image is cropped if it is required to keep the original aspect ratio. The assigned solid color behaves in the same manner as in the ifmStretch mode. |
Note
The custom color assigned via the Color property, always fills the badge UI adorner’s background area occupied by non-transparent pixels of the assigned image.
The default FitMode property value is ifmStretch.