Ticket T167557
Visible to All Users

How to show the DockPanel like the FlyoutPanel control? (never the auto hide tab visible and with slide in and slide out animation)

created 10 years ago

I have added a sample program and movie.

What I want is that when the users clicks the print button in the toolbar, there should be slide in from the right side (so with animation) a panel on which is placed a print preview of a report.

My first approach was using the fly out panel. This was working, but the problem is that flyoutpanels has not the possibility to resize (for the end-user). So on this forum I have read that you should use the dockpanel.

So I have tried it in my example program. But there are some issues:

- I have noticed that a panel should set its visibility to AutoHide instead of hidden because otherwise it is never visible when calling ShowSliding

- But on the right side, the autohide tab should never be visible (the dock panel should slide in when clicking the print toolbar button and should completely hidden when it looses focus.) How to make the auto hide tab NEVER visible? (so that it is taking zero pixels)

- I have set the width to 800 in my sample program, you see that this width is not applied?

Answers approved by DevExpress Support

created 10 years ago

Hello,

Yes, you are correct, DockPanel can't be shown by the ShowSliding method if the Visibility property is set to Hidden. Review the DockPanel.Visibility article for more information regarding this. If you wish to change the DockPanel width when the Visibility property is set to AutoHide, use the approach from the Set dockPanel size ticket.

DockManager does not provide the capability to hide the AutoHideContainers. At the moment, we don't have a ready to use example that illustrates how it can be implemented.

However, you can hide the auto hide container's tab when the dock panel is opened. To do this, use the following code snippet:

C#
dockManager1.AutoHideContainers[0].Visible = false;

Note that with this approach you will have an empty space on the right side. I have modified your project to illustrate this. Please check the attachment.

Alternatively, you can use SplitContainerControl that provides the functionality to collapse a panel when clicking on a splitter. Check the CollapsePanelarticle for more information.  Note that this control does not support slide animation.

I hope you find this information useful. Let me know if you have additional questions.

    Comments (2)

      Hi Nadezhda,
      Thanks for your information.

      Nadezhda (DevExpress Support) 10 years ago

        You are welcome. Please do not hesitate to contact us in case of any difficulty. We will be happy to help you!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.