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
DockPanels fixed positions
Answers approved by DevExpress Support
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.
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
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.