Ticket T312273
Visible to All Users
Duplicate

NavigationPane collapses when current page is re-selected

created 9 years ago

Hi,

I have been using the NavigationPane, in the latest revision 2015 V1.8 a new ShowCollapseButton has been added to remove the collapse button. This is great, but the current page still automatically collapses if the current page tab is selected/clicked again, is there any way to prevent this from happening?

Comments (2)
DevExpress Support Team 9 years ago

    Hello,
    I wasn't able to reproduce this behavior with a simple project. Review the attached video and sample. Would you please modify my project to illustrate the issue? This will help us find a solution.
    I'm looking forward to your response.

    SC SC
    Simon Callcott _1 9 years ago

      Hi Olga,
      Thanks for your reply, I don't think I have explained myself clearly. I was referring to current page tab contents disappearing when a page tab is selected a second time. I would like to prevent this behaviour. I have amended the project you sent to illustrate the issue and included a video which demonstrates my problem.

      Answers approved by DevExpress Support

      created 9 years ago

      Hello Simon,

      Thank you for the project. This behavior occurs because you click on a selected panel again. In this case, this panel will be in the Collapsed state.
      To avoid this behavior, you can handle the NavigationPane.StateChanged event and set the NavigationPane.State property manually.
      I have modified the project. Try the attached project and let us know if it works for you.
      I am looking forward to your response.

        Comments (2)
        SC SC
        Simon Callcott _1 9 years ago

          Hi Nedezha,
          I have tried your application, this works for the first click, however if I click the same panel a second time I get the following exception;
          System.NullReferenceException was unhandled
           HResult=-2147467261
           Message=Object reference not set to an instance of an object.
           Source=DevExpress.XtraBars.v15.1
           StackTrace:
                at DevExpress.XtraBars.Navigation.NavigationPaneButtonsPanelHandler.OnMouseDown(MouseEventArgs e)
                at DevExpress.XtraBars.Navigation.NavigationPane.DoNCMouseDown(MouseEventArgs e)
                at DevExpress.XtraBars.Navigation.NavigationPane.WndProc(Message& m)
                at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
                at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
                at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
                at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
                at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
                at TestNavigationPaneCollapse.Program.Main() in C:\Users\Simon\Documents\Visual Studio 2015\Projects\TestNavigationPaneCollapse\TestNavigationPaneCollapse\Program.cs:line 22
                at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
                at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
                at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
                at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
                at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                at System.Threading.ThreadHelper.ThreadStart()
           InnerException:
          So this doesn't offer a solution, I would be happy to go with your solution if we can get rid of the exception.

          DevExpress Support Team 9 years ago

            Hi,

            We have successfully reproduced the behavior you described and passed a new NavigationPane - NullReferenceException is thrown when clicking a navigation tab header twice and setting the State property in the NavigationPane.StateChanged event handler ticket to our developers' team for further research. Please bear with us. We will notify you as soon as we make any progress.

            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.