Пример #1
0
        public static DragableBehavior Create(Control target, Control movable = null)
        {
            var db = new DragableBehavior();

            db.target = new[] { target };

            if (movable == null)
            {
                db.movable = target;
            }
            else
            {
                db.movable = movable;
            }

            return(db);
        }
Пример #2
0
        public DialogForm()
        {
            InitializeComponent();

            behavior = DragableBehavior.Create(titlePanel, this);
        }