Project DescriptionThis infrastructure provide Attribute base authorization for UI elements within WPF applications
Features
- 3 Levels of authorization - All, ReadOnly, Invisible.
- Control on invisible behavior (Hidden, Collapse, Remove from visual tree)
- Level control from self implementing interface (one method)
- Level base on View model properties (or entire View model class)
- Field level authorization.
- Attach authorization to UI elements with behavior (useful for bound label to correlated TextBox etc...)
- Control on ReadOnly template (ItemsTemplate in ListBox etc) with embedded Data Template or Resource base Template.
How to use
- reference the UIAuth.Common project (or dll).
- Implement IAuthLevelProvider class in your code.
- Assign to AuthBehavior.AuthProvider.
- Mark the View model class / properties with AuthSecurityName attribute with security name for this class/properties.
- In XAML add AuthBehavior to UI elements.
- Optional - for special ReadOnly template add template to Resources or embedded in behavior.