void InitDragDrop() { BehaviorManager behaviorManager1 = new BehaviorManager(this.components); behaviorManager1.Attach <DragDropBehavior>(gridView, behavior => { behavior.Properties.AllowDrop = false; behavior.Properties.InsertIndicatorVisible = true; behavior.Properties.PreviewVisible = true; }); behaviorManager1.Attach <DragDropBehavior>(treeList, behavior => { behavior.Properties.AllowDrop = true; behavior.Properties.InsertIndicatorVisible = true; behavior.Properties.PreviewVisible = true; behavior.DragOver += OnDragOver; behavior.DragDrop += OnDragDrop; }); }
private void Editor_ControlsCreated(object sender, EventArgs e) { if (!(View.Editor is GridListEditor editor) || editor.GridView == null) { return; } editor.Grid.AllowDrop = false; behaviorManager1 = new BehaviorManager(); behaviorManager1.Attach(editor.GridView, MyBehaviorSettings()); }