예제 #1
0
        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;
            });
        }
예제 #2
0
            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());
            }