The requested page is not available for the requested platform. You are viewing the content for Default platform.

File Attachment Properties in Domain Components

File Attachment Property Editors are designed for IFileData type properties. In most cases, you do not need to implement this interface from scratch, because you can use the built-in DomainComponents.Common.IPersistentFileData Domain Component, which supports IFileData. The example below illustrates how to implement File Attachment Properties in a Domain Component interface.

[Aggregated, ExpandObjectMembers(ExpandObjectMembers.Never)]
[FileTypeFilter("DocumentFiles", 1, "*.txt", "*.doc")]
[FileTypeFilter("AllFiles", 2, "*.*")]
IPersistentFileData File { get; set; }

Refer to the FileTypeFilterAttribute description for details on the use of this attribute.


Use the FileAttachmentAttribute attribute to enable Actions that manage file attachments, in addition to the Property Editor functionality.

You can use your own IFileData implementation when required. Refer to the IPersistentFileData class sources at %PROGRAMFILES(x86)%\DevExpress 18.2\Components\\Sources\DevExpress.Persistent\DevExpress.Persistent.Base\DC\IFileData.cs to see an example.