Class DropEffect
Specifies the type of drop effect to be applied during drag-and-drop operations in input components.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class DropEffect : Enum
Remarks
The DropEffect enumeration defines the visual feedback and behavior that occurs when an item is dropped during a drag-and-drop operation. This enum is commonly used in file upload components and other input controls that support drag-and-drop functionality. The drop effect determines how the dragged content will be handled when dropped onto the target area.
Examples
Setting a drop effect for a file upload component:
<SfUploader DropEffect="DropEffect.Copy">
<UploaderEvents ValueChange="OnChange"></UploaderEvents>
</SfUploader>
Fields
Copy
Creates a copy of the dragged item at the drop location.
Declaration
public const DropEffect Copy
Field Value
| Type |
|---|
| DropEffect |
Remarks
When Copy is specified, the original item remains in its source location while a duplicate is created at the drop target.
This is the most common drop effect for file uploads where the original file remains in its source directory.
Default
Uses the default drop effect behavior as determined by the browser or component.
Declaration
public const DropEffect Default
Field Value
| Type |
|---|
| DropEffect |
Remarks
When Default is specified, the component will use the standard drop effect behavior provided by the browser.
This typically defaults to the Copy operation for most file upload scenarios, but may vary based on the browser implementation and context.
Using the default option allows the component to automatically determine the most appropriate drop effect.
Link
Creates a link or reference to the dragged item at the drop location.
Declaration
public const DropEffect Link
Field Value
| Type |
|---|
| DropEffect |
Remarks
When Link is specified, a reference or shortcut to the original item is created at the drop target.
The original item remains unchanged in its source location, and the link provides access to the original content.
This is useful for creating shortcuts or references without duplicating the actual data.
Move
Moves the dragged item from its source to the drop location.
Declaration
public const DropEffect Move
Field Value
| Type |
|---|
| DropEffect |
Remarks
When Move is specified, the item is relocated from its original position to the drop target location.
The original item is removed from the source location once the drop operation is completed successfully.
None
Indicates that no drop effect should be applied, effectively disabling the drop operation.
Declaration
public const DropEffect None
Field Value
| Type |
|---|
| DropEffect |
Remarks
When None is specified, the drop target will not accept the dragged item, and no operation will be performed.
This effectively disables drag-and-drop functionality for the target area and provides visual feedback that dropping is not allowed.