# CanStartDrag(CanStartDragArgs)

> This function is called whenever a TreeViewItem is clicked and dragged. It returns false by default.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.3/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor

```csharp
protected virtual bool CanStartDrag(TreeView<TIdentifier>.CanStartDragArgs args)
```

### Parameters

**** (\[CanStartDragArgs]\(/engine/6000.3/script-reference/unityeditor/imgui/controls/treeview1/canstartdragargs)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

Override this function so it returns true to enable drag and drop behavior for TreeViewItems.

You control TreeView drag and drop in the following order:\\

1. override [TreeView\<TIdentifier>.CanStartDrag](/engine/6000.3/script-reference/unityeditor/imgui/controls/treeview1/canstartdrag.md) to enable dragging TreeViewItems.\\

2. override [TreeView\<TIdentifier>.SetupDragAndDrop](/engine/6000.3/script-reference/unityeditor/imgui/controls/treeview1/setupdraganddrop.md) to set which TreeViewItems are dragged.\\

3. override [TreeView\<TIdentifier>.HandleDragAndDrop](/engine/6000.3/script-reference/unityeditor/imgui/controls/treeview1/handledraganddrop.md) to control the drag and drop behavior of the TreeView.\\
