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

Disabling docking assistant

5 Answers 149 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 08 Mar 2010, 12:47 PM
Hi,

We are very interested in the functionality of the DocumentTabStrip but our users will have little use for and get confused with the concept of the docking assistant. We would like to implement our own behaviour for drag and drop and restrict the ability of the user to define the look of their workspace.

I've hunted through the help and forums but I can't find any way of disabling the docking assistant, is it possible to do this or should we look for other controls?

Is it possible to use a DocumentTabStrip without the outlying RadDock?

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 10 Mar 2010, 08:48 AM
Hi Phil,

Thank you for contacting us and for your interest in RadDock.

Yes, the functionality your application needs can be easily achieved by handling events that come from the DragDropService in RadDock. For more information you may follow this article.

I hope this helps. Do not hesitate to contact us if you have other questions. 


Kind regards,
Georgi
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Phil
Top achievements
Rank 1
answered on 10 Mar 2010, 06:23 PM
Hi,

Thanks for the response. What I was actually hoping to do was to manage the drag and drop event based on the document window I was dragging and the document window I was dropping on to.

The scenario I have is this:

Each document in the dock window has the opportunity to be related/linked to any other document in the dock window. The functionality I wish to incorporate would be to drag one document tab on to the tab of another and to be able to recognise which has been dropped onto what. Then I will open a dialog window that confirms the relationship between the two documents.

However, I can't find a way to do this. The DragDropService seems only concerned with the location of the document regarding docking windows, and I can't construct a DragDrop event on the document tab, because that seems to be part of the DocumentTabStrip and not the DocumentWindow. There is definitely a drag/drop event in that DocumentTabStrip because the documents can change position by dragging, is it possible to hook into that event and to recognise both the document dragged and what it's been dropped onto?

In summary, I want to drag one tab to another and detect the underlying/associated doc for each tab.
0
Georgi
Telerik team
answered on 16 Mar 2010, 11:05 AM
Hi Phil,

As far as I understand you will need to detect drag-and-drop between tabs within the same DocumentTabStrip instance. The drag-and-drop of tab items in RadDock passes through two states:

1. While mouse is within the area where tabs reside, the DragDropService is not started but rather the default drag-drop logic, inherited from the RadTabStripElement is used.
2. When the mouse leaves tabs area the DragDropService is started and the associated with the tab item DockWindow is passed as drag context.

Could you please prepare a sample project that demonstrates the desired behavior of your application so that I can further help you?

Thank you for your time and cooperation.

Best wishes,
Georgi
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Phil
Top achievements
Rank 1
answered on 18 Mar 2010, 08:43 PM
Hi,

I've managed this by mouseup events on the DocumentTabStrip when it is created, and found that the index for the tab and the index for the TabPanel (which is in effect the DocumentWindow) match. This is the effective method called in the DragDrop event:

DocumentWindow FindDocument(Point e) 
        { 
            var tse = _strip.TabStripElement; 
            int tab = 0; 
            int index = 0; 
            DocumentWindow doc = null
             
 
            foreach (var item in tse.Items) 
            { 
                if (e.X < tab + item.Bounds.Width) 
                { 
                    doc = (DocumentWindow)_strip.TabPanels[index]; 
                    break
                } 
                tab += item.Bounds.Width; 
                index++; 
            } 
            return doc; 
        } 

I must say having a DragDrop available on the actual TabStrip element items, as well as a way of accessing the document directly from the tab would have made this learning curve much smoother. Also better API documentation would have been handy.

Many thanks

Phil
0
Georgi
Telerik team
answered on 24 Mar 2010, 03:00 PM
Hello Phil,

Thank you for writing back.

Actually each item in a TabStripPanel (base class for DocumentTabStrip and ToolTabStrip) is an extended TabItem, namely TabStripItem, which holds a reference to the associated TabPanel (base class for DockWindow). I was not sure what you are after and that is why I could not find the proper solution for you.

I would like to thank you for your time and feedback, it is much appreciated.


Best wishes,
Georgi
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
Phil
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Phil
Top achievements
Rank 1
Share this question
or