to solve the problem described here
I tried to handle the SplitterMoved event.
BUT - the SplitterEventArgs give the wrong values.
To reproduce it use the following steps:
Create an app with a dockmanager holding two panels.
For easy investigation move the splitter to some high XPositon.
Lets say - about the middle of your form.
Now add a handler to the SplitterMoved Event in the primary site.
Add a dummy code line there - for an example
Add a breakpoint at that line.
Now start debugging - and drag the splitter very far to the left.
Release the mouse button -- BP hit.
Now check the value of e.SplitX.
EXPECTED: some small value
GOT: the value where the splitter was before dragging!!!
To proof this is not a "SplitterMoved normal behaviour" do the following.
On the rigth pane of your docking add System.Windows.Forms.SplitContainer.
Place the splitter also into the middle of the container.
Add a handler for SplitterMoved.
Add the same dummy code line as for your other handler.
Place a breakpoint at this line of code.
Run your application.
FIRST: you will see an initial break in the SplitContainer SplitterMoved handler
>>this event is not fired for the PrimarySite !!
Move the splitter of the SplitContainer far to the left.
Release the mouse - BP hit.
Check the value of e.SplitX
It is a small number - as expected.