Hello,
I'm working with an UltraDockManager on a WinForms application that looks something like this:
The area in question is highlighted in yellow above, labeled "Schedule". This area is a user control that contains an UltraDayView/UltraWeekView that allows the user to add appointments, etc. What I'm hoping to be able to do is to double click the pane's header, and have the yellow area maximize to fill the entire form like this, where the yellow would be a UltraDayView/UltraWeekView set to fill the screen:
And then go back to its pinned position on another double click. I'd like to achieve this without allowing the dock area containing the Schedule to float. Is this possible with any pre-defined methods or combination of properties? What event should I be looking for in order to achieve this functionality, if it doesn't exist already?
Any help, comments, or input is greatly appreciated.
Thanks!
Any feedback on this yet? Still waiting for a response.
Hello Melissa,
Could yuu please take a look at the attached sample and vidoe file. This is one possible way to achieve desired behavior. Let me know if you have any questions.
Regards
private void ultraDockManager1_PaneActivate(object sender, Infragistics.Win.UltraWinDock.ControlPaneEventArgs e) { if (e.Pane.DockedState == Infragistics.Win.UltraWinDock.DockedState.Floating) { e.Pane.Dock(true); e.Pane.Pin(); if (Convert.ToBoolean(e.Pane.DockAreaPane.Tag) != true) { foreach (DockableControlPane item in ultraDockManager1.ControlPanes) { if (item != e.Pane) item.Close(); } e.Pane.DockAreaPane.Tag = true; e.Pane.DockAreaPane.Size = new Size(this.Width - 20, this.Height - 40); } else { foreach (DockableControlPane item in ultraDockManager1.ControlPanes) { if (item != e.Pane) item.Show(); } e.Pane.DockAreaPane.Tag = false; e.Pane.DockAreaPane.ResetSize(); } } }
private void ultraDockManager1_PaneActivate(object sender, Infragistics.Win.UltraWinDock.ControlPaneEventArgs e)
{
if (e.Pane.DockedState == Infragistics.Win.UltraWinDock.DockedState.Floating)
e.Pane.Dock(true);
e.Pane.Pin();
if (Convert.ToBoolean(e.Pane.DockAreaPane.Tag) != true)
foreach (DockableControlPane item in ultraDockManager1.ControlPanes)
if (item != e.Pane) item.Close();
}
e.Pane.DockAreaPane.Tag = true;
e.Pane.DockAreaPane.Size = new Size(this.Width - 20, this.Height - 40);
else
if (item != e.Pane) item.Show();
e.Pane.DockAreaPane.Tag = false;
e.Pane.DockAreaPane.ResetSize();
Have you been able to resolve your issue ? Did you have a time to take a look at the attached sample? Let me know if you have any questions
Thanks for the response, Georgi.
I've added the code sample that you gave me, and it does maximize the panel on a double click like I'm wanting. However, if I double click on the pane again, it doesn't minimize back to its original size consistently.
I think this might be caused by the PaneActivate event being fired every time I mouse over the pane. I want this behavior to ONLY occur when the header of the pane is double clicked. The pane should remain minimized until they double click on the header again.
Is there a different event that I might try, or some adaptions to the code you gave me above to achieve this?
It looks like the sample you gave me has this behavior, and the code is the same as what you typed above. I'm not sure what's going wrong.
Did you have a time to take a look at the attached video file. Right now I made a test with my sample and everything works properly. Please note that in my test I used the latest available version and service release - 11.2.20112.2034. Could you please tell me what is your version and do you have any installed service release and which one?
Could you please take a look at the attached video file that I made for you. Also you could find additional information in our online documentation: http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.2/CLR2.0/html/WinDockManager.html
Let me know if you have any further questions.
I'm currently using version 11.2.20112.1010. I think the behavior may be caused by the way I'm programmatically adding the dock areas to the dock manager. In your example, it looks like you're adding them through the designer somehow. Do you have an example of how I can do this, and see if that's what causing the strange behavior?