Login Window

Topics: Bootstrappers & IoC, Conventions
May 31, 2012 at 2:59 PM

I am currently working on a project where I would like to set "securities" (these are only cosmetic - security is checked on a server component) for UIElements. This means that when a user does not have the security to show an element it makes no sense to show it on the gui, because it won't have any effect.

My approach would be to use the ConventionManager and depending on an attached property I would like to set the Visibility/Enabled status of UIElements.

This works very well if I do it inside the Bootstrapper, but I have the problem that the user needs to sign on to have the security data for the Bootstrapper available. Is it possible to change the ConvetionManager after the Bootstrapper or would it make sense to open the login window inside the Configure method and set the ConventionManager after that?

Jun 12, 2012 at 5:12 AM

Interesting question, and one I'd like to know the answer for it also.

Did you have any luck?

Jun 12, 2012 at 8:47 AM

I'm sure that we can add custom conventions in ConventionManager at anytime, but I think the new conventions will be applied only to new instances of views that are created after the settings was changed. If your LoginWindow is created early than other views of the application, then setting custom conventions on ConventionManager will be applied if the subsequent views are created after the login process.


Is that your case?


Tell us if it works.