What Changed
In v24.2, the DxFileDataPropertyEditor
is the default property editor for new and existing ASP.NET Core Blazor projects with the File Attachments module. The previous default editor (FileDataPropertyEditor
) has been moved to maintenance support mode. This means that no new features/capabilities will be added to that component.
Reasons for Change
In a recent release, a new component - Blazor File Input - was added to the DevExpress ASP.NET Core Blazor product line. This component allows you to set up accepted types for downloaded files. This capability allows us to partially support the FileTypeFilter attribute in Blazor apps.
As a result, we changed the default property editor in XAF apps to an editor based on the new Blazor File Input component. Another reason for this change is that the new default property editor is easier to maintain and customize.
Impact on Existing Apps
This change affects your application only if you customized FileDataPropertyEditor
. These customizations do not apply to the new editor, unless you revert to the previous property editor type (see the section below).
How to Update Existing Apps
The new editor provides access to several component models for customization:
editor.ComponentModel
:DxFileInputModel
customizes the File Upload functionality.editor.ComboBoxModel
:DxComboBoxModel
defines the appearance of the property editor.editor.AttachButton
&editor.ClearButton
:DxEditorButtonModel
controls the behavior of the Attach and Clear buttons displayed in the editor. Note that the File Input button's behavior is controlled by theeditor.ComponentModel.ExternalSelectButtonCssSelector
property.
How to Revert to Previous Behavior
To roll back to FileDataPropertyEditor
, do the following:
- Open the Model.xafml file of your SolutionName.Blazor.Server or SolutionName.Module.Blazor project.
- In the Model Editor, navigate to the ViewItems | PropertyEditors | IFileData node and set the
EditorType
property toDevExpress.ExpressApp.FileAttachments.Blazor.Editors.FileDataPropertyEditor
:
XML<ViewItems>
<PropertyEditor Name="PropertyEditors">
<RegisteredPropertyEditor PropertyType="DevExpress.Persistent.Base.IFileData" EditorType="DevExpress.ExpressApp.FileAttachments.Blazor.Editors.FileDataPropertyEditor" />