Ticket T870313
Visible to All Users

DockPanels fixed positions

created 5 years ago

Hello,
my application contains a lot of dockPanels and an administrator can change all the interface (he can move dockPanel on other windows, resize its, put as tab panel, …) and after he saves with SaveLayoutToXml (for dockManager, tabbedView and for other controls with MainView.SaveLayoutToXml).
When an operator (not admin) start the application I use RestoreLayoutFromXml to load the previous settings.
My goal is that that operator can't change anything (no move, no close, no resize … for any dockpanel).
I didn't find a readonly property of dockmanager or tabbedview so I start to use dockManager1_ClosingPanel and dockManager1_StartDocking events to block events. I see also that using dockPanel.Options I can hide some buttons (close, maximize, autohide).
My question is: is there a faster method to block all the graphics interface ?
Thank you

Answers approved by DevExpress Support

created 5 years ago

Hello Dino,

To prohibit any layout customization to end users, do the following:

  • Disable these DockManager's DockingOptions: ShowAutoHideButton, ShowCloseButton, ShowMaximizeButton;
  • Handle the DockManager.StartDocking event and set its e.Cancel parameter to true to prevent all dock panels from changing their docking state;
  • Handle the DockManager.StartSizing event and set its e.Cancel parameter to true so that your end users can't resize panels. Alternatively, you can set the Options.ResizeDirection property of all dock panels to ResizeDirection.None. In this case, resize cursors will not even be displayed on hovering the mouse pointer over panel edges.
    Please try these recommendations and let me know if they work for you.
    Show previous comments (1)
    DevExpress Support Team 5 years ago

      Hi Dino,

      I'm happy to hear that my assistance was helpful. As for the issue with the close button, I didn't manage to reproduce it. Attached is a sample project that I used for tests. It works fine on my side. Could you please modify it to show the issue with the close button?

        I try with your demo, but I cannot reproduce the problem.
        My application has many dockpanels and tabbed documents so I think the problem is related to graphic complexity.
        Moreover I see that the closing button disappears immediately when I lost focus on tab.
        Since it is only a temporary graphic bug and I can use DocumentClosing event to block, this problem is very weak and not important for my application.
        Thanks

        DevExpress Support Team 5 years ago

          OK, Dino, I see your point. However, if you can recreate this issue in a sample project, please send it to us for research.
          If there is anything else I can do for you at the moment, let me know.

          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.