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
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.
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?