This project is read-only.

Forbid DockableContent to be dragged

Oct 13, 2010 at 5:43 PM

Hello,

DockableContent have a IsCloseable property. But I need something as a IsDraggable property.

DockableContent class:

       protected override void OnDragStart(Point ptMouse, Point ptRelativeMouse)
        {
            if (DockableStyle != DockableStyle.None &&
                (State == DockableContentState.Docked || State == DockableContentState.Document || State == DockableContentState.DockableWindow) &&
                !Manager.DragPaneServices.IsDragging)

Which of those properties, DockableStyle or State, should be set to what value to forbid dragging without getting side effects ? Or maybe this is not the right place ?

Thanks for help

Oct 22, 2010 at 5:32 PM

Hi Ed,

I would not check the style or state. Plug a custom attribute or even attribute class into the Tag property of your DockableContent, then OnDragStart analyse the Tag, if it contains your attribute invoke your desired action.

Rob