Skip to main content
A newer version of this page is available. .

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 and ASP.NET 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 Editors’ 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 Feature Center demo is installed in %PUBLIC%\Documents\DevExpress Demos 18.2\Components\eXpressApp Framework\FeatureCenter by default. The ASP.NET version of this demo is available online at https://demos.devexpress.com/XAF/FeatureCenter/. You can also watch the Image Property Editor tutorial video at the DevExpress YouTube channel.

Examples

WinForms Property Editors for Image Properties

Each WinForms Property Editor has a control that displays a corresponding property in a Detail View, and a repository item that displays a property in a List Editor that supports in-place editing. Both the control and repository item are shown below.

ImagePropertyEditor

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

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

Description:

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

The PictureEdit and RepositoryItemImageEdit are used by default.

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.

ASP.NET Property Editors for Image Properties

Each ASP.NET Property Editor has controls that display a property in a Detail View‘s View and Edit mode (see DetailView.ViewEditMode). These controls are listed below.

ASPxImagePropertyEditor

View mode controls:

  • ImageEdit represents a Panel control descendant from the standard library;
  • DropDownImageEdit is an ImageEdit control with a Show Image/Hide image button.

Edit mode controls:

  • ImageEdit represents a Panel control descendant from the standard library.
  • DropDownImageEdit is an ImageEdit control with a Show Image/Hide image button.

Description:

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

When displayed in view mode, the ImageEdit control is always read-only.

When the Property Editor is read-only, only the ASPxImage control is displayed. When it is editable, a table with the Edit and Clear ASPxButton type buttons is shown as well, and the ASPxUploadControl is used to upload a new image. A browser editor is displayed when no image is assigned.

Use the ImageEditorAttribute to configure the ASPxImagePropertyEditor for a particular business class property. Refer to the How to: Access the ASPxImagePropertyEditor controls in View and Edit modes KB article to learn how to access ASPxImagePropertyEditor‘s controls and customize them.

In the current implementation of the ASPxImagePropertyEditor, the upload progress is not be shown in case the ImmediatePostDataAttribute is applied to the current FileData property or the IModelCommonMemberViewItem.ImmediatePostData option is enabled in the Model Editor for the current View Item.

Mobile Property Editors for Image Properties

The MobileImagePropertyEditor property editor uses the Image control. This control uses the img HTML element to display images in the Detail View‘s View and Edit modes (see DetailView.ViewEditMode).

See Also