Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Collapse]Concepts
  [Expand]Application Solution Components
  [Collapse]Business Model Design
    Business Model Design Basics
    Built-in Business Classes for Most Popular Scenarios
   [Expand]Business Model Design with Entity Framework
   [Expand]Business Model Design with XPO
    Non-Persistent Objects
    PropertyChanged Event in Business Classes
   [Collapse]Data Types Supported by built-in Editors
     Key Properties
    [Expand]String Properties
    [Expand]Numeric Properties
    [Expand]Date and Time Properties
    [Expand]Boolean Properties
    [Collapse]BLOB Image Properties
      BLOB Image Properties in XPO
      BLOB Image Properties in Entity Framework
      BLOB Image Properties in Domain Components
    [Expand]Collection Properties
    [Expand]Reference (Foreign Key, Complex Type) Properties
    [Expand]File Attachment Properties
    [Expand]Type Properties
    [Expand]Enumeration Properties
    [Expand]Criteria Properties
    [Expand]Color Properties
     Geolocation Properties
     Miscellaneous Property Types
    Mapping Complex Types to the Database
   [Expand]Types Info Subsystem
    Connect an XAF Application to a Database Provider
    Data Annotations in Data Model
    Create and Update the Application's Database
  [Expand]Application Model
  [Expand]UI Construction
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]Localization
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Filtering
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

BLOB Image Properties

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.

WinForms

ASP.NET

Mobile

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 17.2\Components\eXpressApp Framework\FeatureCenter by default. The ASP.NET version of this demo is available online at http://demos.devexpress.com/XAF/FeatureCenter/. You can also watch the Image Property Editor tutorial video at the DevExpress YouTube channel.

Expanded Examples

Expanded 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.

Expanded 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.

Expanded Mobile Property Editors for Image Properties

Each Mobile Property Editor has widgets that display a property in a Detail View's View and Edit mode (see DetailView.ViewEditMode). These widgets are listed below.

MobileImagePropertyEditor

View mode control: Image that displays an image using the img HTML element.

Edit mode control: images are not displayed in this mode.

Description:

You can upload or delete an image only in View mode.

Delayed properties are not supported.

Expanded See Also

How would you rate this topic?​​​​​​​