Hi,
I created a dock manager to which users can add panes when they press some buttons. These panes are floating by default, but the user may choose to dock them or add them to the center area, which is tabbed. When the application is started up, one pane is (by default) added to the tabbed area (to the documentContentHost). This pane should always be on the left in the list of tabs. That is, it should always be the first one.
Is there any way to "lock" that specific pane into its place in the list of tabs? Also, when a pane is added to the tabbed area, it is always added on the left; it is possible to add them to the right?
Kind regards,
Stefan
Hello,
I am checking your progress on the issue.
If you require any further assistance on the matter please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
Right clicking on a pane and choosing Tabbed Document will cause the Execut(ing|ed)Command for the ChangeToDocument but not when dragging. Dragging requires specific manipulation of the panes being dragged to be positioned in a specific target. There is nothing exposed that will allow you to manipulate the position. You would likely need to handle the PaneDragEnded event and then manipulate the position of the panes that were moved. But as I mentioned if you end up moving it such that it is out of view (i.e. not in the visible area of the tab header of the tabgrouppane) then the pane will be moved into view at the beginning/left when the pane is activated just as happens with VS.
Andrew Smith"] Dragging a floating dockable pane over the document content host will just add it to the document content host.
Dragging a floating dockable pane over the document content host will just add it to the document content host.
Exactly, this is what I'm talking about. But when I do this, the tab for this window is added on the left. It is the same when I right click the floating window's title bar and select "Tabbed document".
I'm currently investigating if I can react to the following event:
EventManager
.RegisterClassHandler(typeof(ContentPane), ContentPane.ExecutedCommandEvent, new RoutedEventHandler(OnExecutedCommandEvent), true);
And then check if the command is a tabbing action, which would be something like: (although this code isn't correct, but it does show what I intend to do)
private
void OnExecutedCommandEvent(object sender, RoutedEventArgs e){
if (e.RoutedEvent.Equals(ContentPaneCommands.ChangeToDocument))
{ /* Manipulate the document content */ }
}
Do you think this is going anywhere good?
There is nothing that will force a pane to remain in a specific index. You may submit a feature request for that or you could write your own custom panel that positions the items as you want and then use that as the itemspanel of the tabgrouppane. With regards to adding to the left/right, the behavior depends on what is being dragged and to where. e.g. Dragging a floating dockable pane over the document content host will just add it to the document content host. Dragging a floating dockable pane over a docked tab group (or dragging a document tab over another document tab) will position it based on the tab item that you drag over. Note too that the default itemspanel used when the tabgrouppane is within the documentcontenthost mimics the vs behavior where the panel does not scroll and so if a tab is selected that is not in view it is moved in the items collection to the first visible slot.