Hi All,
I use the StrataFlix sample approach for some of my applications, and the StrataFlix uses a class named ActionLinkMenuItem.vb to substitute the standard ToolStrip menu with some nice links added on left side of the screen.
Adding Role Base Security to my application I had the need to control these Action Link Menu Items via a SecurityKey like many of the SF controls, so I when back to the SF source code and found how they created these properties for other controls and simply added to the ActionLinkMenuItem.vb class and voila! now all my Action Link Menu Items have a SecurityKey property linked to the SF SecurityKeyTypeEditor to allow me to lookup my security keys and assign it to this control.
So here is the property code which you can find in the SF source:
Private _SecurityKey As String = ""
'''
''' Sets the permission key using the SF SecurityKey type editor
'''
DefaultValue(""), _
Description("The permission key used to determine whether the current user has permission to action assigned to this menu."), _
Editor(MicroFour.StrataFrame.Extensibility.Constants.TE_SecurityKeyTypeEditor, GetType(UITypeEditor))> _
Public Property SecurityKey() As String
Get
Return _SecurityKey
End Get
Set(ByVal value As String)
_SecurityKey = value
End Set
End Property
Of course this can be added to any custom class we may need to extend to make our life easier. If you copy this code just make sure to replace the with your own description.