I traced a little bit, seems when the control is at floating state, it is on a control which is called FloatingWindowContain. And it is inheriance from Forms. And the FormBorderStyle is a toolWindow. Thus, by default the floating window does not have maxmize/minimize button.
In my appliciation, I want the default behavier to be the floating window will have the max/min button.
Here is what I did:
at runtime, when a dockable panel is changing to a floating state, I get the floating window control (which is FloatingWindowContain) using FindForm() method and modify the FormBorderStyle to Sizable. The floating window will show the max/min button.
However, is there any cleaner ways to do it?
There is no property in the dock manager to accomplish this if that's what you are asking.
not necessary have an property from dock manager.
I'm wondering, if dock manager expose a method (it can be either virtual protected method or event) that give me a chance to do something (overriding some behavier) about the floatingWindowContainer when it is instantiated.
to be more specific, which class instantiated the floatingWindowContainer? Is there any chance for an API user modify the floatingWindowContainer once it is created?
It doesn't look like there is any virtual method that could be overridden to modify the FloatingWindowContainer upon creation. The only event I see fired after the creation of this class is PaneInitialized, but it only fires once for each pane. You might be able to handle that event and use it for DockAreaPanes with a DockedState of Floating. I'm not entirely sure, but I think a new DockAreaPane will be initialized for each new floating pane, so this might work.
which class has the PaneInitialized?
UltraDockManager
In that case it seems like it might be a little more difficult. I would suggest submitting a feature request for the ability to have access to the floating window form upon creation: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
thing is
during the event, I traced the DockAreaPane object and trying to access the its UIElement object by the following
Assume I have a DockAreaPane object dockArea;
when I call dockArea.Element, it returns null.
Sorry, the event name is InitializePane.
If you have any visible pane, you can get its Element.Control to get the control hosting the pane. Then if you know the pane is floating, you can call FindForm() on the owning control to get the FloatingWindowContainer.
Here is my trouble.
I have the DockAreaPane object, and I know it is floating. How will I able to get the FloatingWindowContainer object that associated with it?
let me ask in this way
For such class:
Public Class FloatingWindowContainer
It has no public constructor, and the class itself is public. So I'm assuming the class is exposed by some method. (Otherwize, why it is public.)
So my question is, which method/property expose this class? or there's none?