Back to Devexpress

DragDropBehaviorProperties.InsertIndicatorVisible Property

windowsforms-devexpress-dot-utils-dot-dragdrop-dot-dragdropbehaviorproperties-979501f4.md

latest3.8 KB
Original Source

DragDropBehaviorProperties.InsertIndicatorVisible Property

Gets or sets whether to display the indicator that shows the position in the target control where dragged elements will be inserted.

Namespace : DevExpress.Utils.DragDrop

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue(true)]
[DXCategory("Customization")]
public bool InsertIndicatorVisible { get; set; }
vb
<DefaultValue(True)>
<DXCategory("Customization")>
Public Property InsertIndicatorVisible As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true to show the insert indicator; otherwise, false.

|

Remarks

The DragDropManager.InsertIndicatorVisible setting allows you to disable the insert indicator for all controls. If this setting is enabled, you can disable a particular control’s insert indicator with the DragDropBehavior.Properties.InsertIndicatorVisible property.

Handle the DragDropEvents.DragOver event to customize the insert indicator.

The default insert indicator is a semi-transparent rectangle.

The InsertIndicatorLocation and InsertIndicatorSize event arguments allow you to customize its size and position.

You can also use the InsertIndicator event argument to display a custom image.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InsertIndicatorVisible 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#L55

csharp
behavior.Properties.AllowDrop = false;
behavior.Properties.InsertIndicatorVisible = true;
behavior.Properties.PreviewVisible = true;

drag-drop-grid-rows-to-treelist/VB/DragAndDropRows/Form1.vb#L54

vb
behavior.Properties.AllowDrop = False
behavior.Properties.InsertIndicatorVisible = True
behavior.Properties.PreviewVisible = True

See Also

DragDropBehaviorProperties Class

DragDropBehaviorProperties Members

DevExpress.Utils.DragDrop Namespace