I have a tab control which I docked in my windows form via the ultraDockManager. When I drag the window to undock it from the main form, is there a way I can maximize that undocked window to fill my entire second screen or is this simply not a feature of the dock manager? I do have maximize and minimize buttons visible in the upper right corner of the undocked window but I think those are for maximizing and minimizing within the panel itself, not to maximize the entire docked window. Any help would be very much appreciated.
Thanks!
Hi Michelle,
The floating pane is just a normal window, so you won't be able to resize it that way when it's maximized. Panes don't normally expose any way to control maximize/minimize, so you'll need to handle that manually. One way you can work around that is to set the size of the window so that it takes up the whole screen. It won't be maximized, so you'll be able to resize it, move it, etc.
The WindowState property comes from the form rather than the UltraDockManager, and all forms have this property. You wouldn't be able to set it at design time, since the form for the floating pane doesn't exist until the pane actually becomes floating at runtime. Once that happens, the pane has its own form separate from the main form for your application. That's why we needed to use the FindForm() method to get at it.
Hi Mike,
I'm unable to resize the window by grabbing and dragging the edges after I added the abovementioned code. The undocked window just remains in a maximized state. I'm also unable to maximize and minimize the undocked window. All I have in that window is a tab control which I set to 'Dock Controls'. Is the WindowsState property a property in the UltraDockManager? If so, do you know under what tree I can find this property?
Thanks,
Michelle
You can toggle between minimized and maximized by setting the WindowState property on the undocked window.
The undocked window can be resized normally by grabbing and dragging the edges. This should work out of the box -- are you experiencing any issues relateed to resizing the DockablePane?
Mike,
Thank you so much, this works great.
Is there a way to toggle the undocked pane between a maximized and minimized state or resize the undocked window all together by grabbing and dragging the edges?
Thanks,Michelle
Hello, You can add the following code to the AfterToggleDockState and AfterDockChange event handlers for the UltraDockManager:
if (e.Pane.DockedState == Infragistics.Win.UltraWinDock.DockedState.Floating) (e.Pane as DockableControlPane).Control.FindForm().WindowState = FormWindowState.Maximized;