windowsforms-devexpress-dot-utils-dot-dragdrop-dot-dragdropbehaviorproperties-1dcf03cb.md
Gets or sets whether a preview of the dragged element is displayed during a drag-and-drop operation.
Namespace : DevExpress.Utils.DragDrop
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DefaultValue(true)]
[DXCategory("Customization")]
public bool PreviewVisible { get; set; }
<DefaultValue(True)>
<DXCategory("Customization")>
Public Property PreviewVisible As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to display a preview of the dragged element; otherwise, false.
|
During a drag-and-drop operation, the Behavior Manager shows a preview of dragged data elements near the mouse pointer. You can use the DragDropManager.PreviewShowMode property to disable the preview image or enable it for target controls only.
If this setting is enabled, you can disable a particular control’s preview with the DragDropBehavior.Properties.PreviewVisible property.
To customize the preview image, use the following options:
the PreviewImage event argument in a DragDropManager.QueryDragPreviewImage event handler
the PreviewImage event argument in a DragDropEvents.BeginDragDrop event handler
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PreviewVisible property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
drag-drop-grid-rows-to-treelist/CS/DragAndDropRows/Form1.cs#L56
behavior.Properties.InsertIndicatorVisible = true;
behavior.Properties.PreviewVisible = true;
});
drag-drop-grid-rows-to-treelist/VB/DragAndDropRows/Form1.vb#L55
behavior.Properties.InsertIndicatorVisible = True
behavior.Properties.PreviewVisible = True
End Sub)
See Also
DragDropBehaviorProperties Class