Fixed Layout

Mar 17, 2011 at 7:26 AM

Hello,

I'm trying to write a program where I have two different kinds of users, supervisor and standard.

The supervisor should be able to use all features of AvalonDock, moving and docking windows, saving layouts and so on.

The standard user should only be able to load the layouts that the supervisor saved beforehand. He should not be able to dock/undock windows and so on.

Is it possible with AvalonDock to prevent the user from docking/undocking/moving windows?

 

TIA

Michael

Mar 17, 2011 at 8:55 AM

Some tracks:

- docking/undocking is based on mouse events that are handled by AvalonDock. If you need to filter those events I think there is no other way than modifying AvalonDock code.

- This can be done in xaml style definitions. Easy to do - we did it for some of our examples - but will be static. If you have a few window you can create a version for each kinf of user. Basic and not very clever but OK.

- This can be done in code. The best way should be to use Dependency Injection based on users roles.

I think this is not that complicated but will be complex to write, debug and maintain if you don't have a good knowledge of the AvalonDock code. It worth you spend some time to validate all ideas (including mine) before starting coding.

Hope this helps

Bernard from Sofa, an AvalonDock wrapper.