This is a migrated thread and some comments may be shown as answers.

Prevent Docking to Fill Position

3 Answers 213 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 14 Oct 2011, 09:00 PM
Tech, 

I am using Telerik Version 2009.2.9.701. and Using Telerik.WinControls.Docking.DockingManager in my Form. I am using DockPanel. when user start drag and Drop. I want to prevent user from dropping to Fill DockPosition.

In new version, offers DragDropService which has AllowedDockManagerEdges and PreviewDockPosition to achive this funcnality. But, at this point I can not update the my Telerik Version to new one.so, I have restriction to use only 2009.2.9.701.

Please suggest any solution or workaround that is avilable in 2009.2.9.701 Version in Telerik.WinControl.Docking.dll. 

Help would be appriciated.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 Oct 2011, 01:50 PM
Hi Paul,

For the old DockingManager control, you can use DockingStateChanging event and cancel operation for TabbedDocument state:

void dockingManager_DockingStateChanging(object sender, DockingChangingEventArgs e)
{
    if (e.DockObject == myToolWindow && e.DockableState == Telerik.WinControls.Docking.DockState.TabbedDocument)
    {
        e.Cancel = true;
    }
}

Please note that in general our DockingManager control is no longer supported and its implementation will be removed from our suite in Q3 2011. I would strongly recommend updating to your latest releases where many issues have been addressed and many controls have been greatly improved.

I hope this helps.


All the best,
Julian Benkov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Lorenzo
Top achievements
Rank 1
answered on 08 Nov 2011, 10:18 AM
Hi,

I have to prevent Docking to Fill Position too. How can I do that with the new RadDock control?
I used the AllowedDockState of my ToolWindow:

toolWindow1.AllowedDockState = AllowedDockState.AutoHide | AllowedDockState.Docked | AllowedDockState.Floating | AllowedDockState.Hidden;

But when i drag the toolWindow1 I still see the Docking Assistant that shows me the DocumentContainer area. If I drop my window there nothing happen, but the user get confused.

Is there any way to achieve this goal? It is possible to remove DocumentContainer area and replace it with MDI container instead?

Thanks in advance.
Lorenzo
0
Julian Benkov
Telerik team
answered on 11 Nov 2011, 11:20 AM
Hello Lorenzo,

You can prevent Fill position globally for your application behavior by using the DragDropAllowedDockStates property of RadDock:

radDock1.DragDropAllowedDockStates = AllowedDockState.AutoHide | AllowedDockState.Docked | AllowedDockState.Floating | AllowedDockState.Hidden;

Replacing TabbedDocument container with classic MDI is not supported functionality.

Do not hesitate to contact us if you have further questions or issues.

Kind regards,
Julian Benkov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
Dock
Asked by
Paul
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Lorenzo
Top achievements
Rank 1
Share this question
or