Skip to main content

BLOB Image Properties

  • 3 minutes to read

In XAF, BLOB image properties are persisted as byte arrays which can be displayed in the following controls:

  • A PictureEdit control (default)
  • A drop-down control (for WinForms applications only)

Note

BLOB, or Binary Large Object, is a set of binary data persisted as a single entity in the database.

The ImageEditorAttribute specifies Image Property Editor settings when displaying images.

Note

Refer to the Property Editors | Image Properties section in the Feature Center demo installed with XAF to see Image Property Editors in action. The default location of the application is %PUBLIC%\Documents\DevExpress Demos 25.2\Components\XAF\FeatureCenter.NET.XPO. You can also watch the Image Property Editor tutorial video at the DevExpress YouTube channel.

Examples

ASP.NET Core Blazor

XAF BLOB Image Properties ASP.NET Core Blazor

ImagePropertyEditor

Used as the default editor for properties of the following types:

ImagePropertyEditor uses a custom ImageEditComponent class to implement the editor’s functionality.

In Detail Views, the editor displays a placeholder icon if the bound property is empty. A user can click the icon to upload a new image. An ellipsis button over the image provides access to Replace and Remove buttons.

On mobile devices and in List View Inline Edit mode, the editor does not show its ellipsis button. To access Replace and Remove buttons, a user can click or tap the editor. On mobile devices, these commands appear in a pop-up menu. To close the menu, use the Cancel button or tap the pop-up background.

To access Context Menu and mobile pop-up menu instances, use ComponentModel.ContextMenu and ComponentModel.PopupMenu respectively.

For additional customization, implement your own custom property editor as described in the following topic: Implement a Property Editor Based on a Custom Component (Blazor).

WinForms

XAF BLOB Image Properties WinForms

Each Windows Forms Property Editor is available in two forms:

  • A standalone control (displays property value in a Detail View)
  • A repository item (displays property value in a List Editor that supports in-place editing)

ImagePropertyEditor

Control: The PictureEdit or ImageEdit editor from the XtraEditors Library.

Repository Item: RepositoryItemPictureEdit or RepositoryItemImageEdit repository item from the XtraEditors Library.

Description:

Used for byte array properties decorated by the ImageEditorAttribute and for reference properties of the MediaDataObject and MediaDataObject types.

The default configuration is PictureEdit and RepositoryItemImageEdit.

Both PictureEdit and ImageEdit editors allow end users to perform Load, Save, Delete, Cut, Copy, and Paste operations using a context menu.

Use ImageEditorAttribute to configure the ImagePropertyEditor for a particular business class property.

See Also