I am new at using the WinDockManager control so bear with me....
I have a windows forms app that has a main window. What I am doing is allowing the user to add a picture box, for example, using the DockControls method below to the main form:
pane.Settings.ShowCaption = DefaultableBoolean.False;
This part looks great...until...the user moves the main form window and the pane is actually docked to a screen location and not to to the main form. So my question is this, is there a way to 'free form' dock these panes using the dock manager so that the user can layout the panes making up the app anywhere they want? Is this a parenting issue? Can I assign parents to make this behave the way I want? I want my user to be able to have the option to dock control panes in the traditional sense like top/bottom/right/left OR 'freeze' a pane to any location they choose on the main form.
Any help is appreciated...
The UltraDockManager does not support this functionality, so it would need to be implemented manually. I wouldn't recommend re-parenting anything because the dock manager may change this parenting or it might put the dock manager in a bad state. I think the best approach here would be to handle the LocationChanged event of the Form and update the FloatingLocation of the DockAreaPane to so it is always at the same offset from the Form's location once it has been 'frozen'
Thanks...I will give that LocationChanged/FloatingLocation combo a try.
Since posting this question, I have discovered another behavior that may be useful as well. I noticed that when I drag the floating pane to the center of the drag indicators it takes away the 'Floating' and 'Dockable' settings for the pane. What I am left with is something that looks like a basic form.
I may try a route where I set the Floating/Dockable settings programmatically which gives me something that is contained within the main form of my app. Once I have that I can try to 'freeze' it. If you have any advice or experience with this route I would appreciate it.
I just need to try both and see which one works best.
abissette said:I may try a route where I set the Floating/Dockable settings programmatically which gives me something that is contained within the main form of my app. Once I have that I can try to 'freeze' it. If you have any advice or experience with this route I would appreciate it.
I'm not really sure what you're referring to here, so I can't offer any help with this right now.
I would recommend trying what I suggested to get your first approach working, since it sounds like you have most of that approach done anyway. Then if you have time you can try going down this other route to see if it solves the problem in a better way.