I am using v2.5 RC1. I think I have found a bug. Using the sample code (screen shot attached) if you switch click on 'document 1' the activate event is fired. If you click on document 3 (on the bottom) pane its activate event is not fired. If you go back and click on document 1 again its activated event is not fired. Looking through the code I found in 'DockPaneStripBase.cs I found the OnMouseDown event:
protected override void OnMouseDown(MouseEventArgs e)
int index = HitTest();
if (index != -1)
IDockContent content = Tabs[index].Content;
if (DockPane.ActiveContent != content)
DockPane.ActiveContent = content;
if (e.Button == MouseButtons.Left)
if (DockPane.DockPanel.AllowEndUserDocking && DockPane.AllowDockDragAndDrop && DockPane.ActiveContent.DockHandler.AllowEndUserDocking)
This bit in particular 'DockPane.ActiveContent != content"
When switching panes the activecontent is remembered from the last time. Should there be a test to see what the last pane that was clicked in?
Log in to post a comment.