﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » Updates and Information » StrataFrame Users Contributed Samples  » Adding SF SecurityKey type editor to custom class</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:46:19 GMT</lastBuildDate><ttl>20</ttl><item><title>Adding SF SecurityKey type editor to custom class</title><link>http://forum.strataframe.net/FindPost24911.aspx</link><description>Hi All,&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
So here is the property code which you can find in the SF source:&lt;br&gt;
[quote]&lt;br&gt;
Private _SecurityKey As String = ""&lt;br&gt;
        ''' &lt;summary&gt;&lt;br&gt;
        ''' Sets the permission key using the SF SecurityKey type editor&lt;br&gt;
        ''' &lt;/summary&gt;&lt;br&gt;
        &lt;Category("Progytech:Security"), _&lt;br&gt;
        DefaultValue(""), _&lt;br&gt;
        Description("The permission key used to determine whether the current user has permission to action assigned to this menu."), _&lt;br&gt;
        Editor(MicroFour.StrataFrame.Extensibility.Constants.TE_SecurityKeyTypeEditor, GetType(UITypeEditor))&gt; _&lt;br&gt;
        Public Property SecurityKey() As String&lt;br&gt;
            Get&lt;br&gt;
                Return _SecurityKey&lt;br&gt;
            End Get&lt;br&gt;
            Set(ByVal value As String)&lt;br&gt;
                _SecurityKey = value&lt;br&gt;
            End Set&lt;br&gt;
        End Property&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
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 &lt;Category()&gt; with your own description.</description><pubDate>Tue, 13 Oct 2009 11:12:49 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Adding SF SecurityKey type editor to custom class</title><link>http://forum.strataframe.net/FindPost24912.aspx</link><description>Thanks.&amp;nbsp; This is very helpful.</description><pubDate>Tue, 13 Oct 2009 11:12:49 GMT</pubDate><dc:creator>Russell Scott Brown</dc:creator></item></channel></rss>