From your description it's unclear if you want to precisely position the bubble over the newly created tab, or if you are fine with it appearing over the tabstrip, at a fixed x-axis location, but positioned correctly based on the y-axis position of the strip (this is the simpler of the two approaches).
So I will provide a solution for the easier scenario, and options for the more complex scenario.
First the easy solution. When the tabs are on top, the Bounds.Top and ClientRectangle.Top values are not the same. When the tabs are on the bottom they are. We can use this information along with the Bounds.Height and Bounds.Top to compute the proper y-axis location.
Below is some sample code that does just this, albeit Naiive. (e.g. It doesn't handle a doc immediately after a create different than if it happened due to user dragging a window, this is left as an exercise for the reader.)
When setting up DockContent, register the event:
class DocumentWindow : DockContent {
//...
}
DocumentWindow doc = new DocumentWindow();
doc.Text = "Document 1";
doc.DockStateChanged += new EventHandler(doc_DockStateChanged);
doc.Show(this.dockPanel1, DockState.Document);
When processing the event:
void doc_DockStateChanged(object sender, EventArgs e)
{
DockContent doc = sender as DockContent;
if (doc != null)
{
if (doc.DockState == DockState.Document)
{
Debug.Write("Client:");
Debug.WriteLine(doc.ClientRectangle);
Debug.Write("Bounds:");
Debug.WriteLine(doc.Bounds);
int y = doc.ClientRectangle.Top == doc.Bounds.Top ? doc.ClientRectangle.Bottom : doc.Bounds.Top;
this.toolTip1.Show("You may tear this \r\nsucker out any \r\ntime you like!", doc.PanelPane, doc.PanelPane.Right, y, 5000);
}
}
}
If you want the fancier approach things will not be as easy. The options I've come up with
for you are below:
1) Alter the base library code to make the DockPaneStripBase.Tab class public and expose the tabs rectangle.
2) Implement your own custom DockPaneStrip as illustrated in the DockSample application code.
3) Examine the code for options 1 and/or 2 and devise a scheme that allows you to compute the location to place the tooltips.
FYI, for others reading this who wish to understand the amount of effort involved in the fancier approach.
The source for both WeifenLuo DockPanel and the DockSample app may be obtained from:
http://sourceforge.net/projects/dockpanelsuite/files/DockPanel%20Suite/2.5.0%20RC1/
It's the package name ending in _Src.