Try our conversational search powered by Generative AI!

Class PlugInPropertyAttribute

Defines that a class contains settings editable from admin mode in plug-in manager.

Inheritance
System.Object
System.Attribute
PlugInPropertyAttribute
Implements
System.Runtime.InteropServices._Attribute
Inherited Members
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Attribute.Match(System.Object)
System.Attribute.IsDefaultAttribute()
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfoCount(System.UInt32)
System.Attribute.System.Runtime.InteropServices._Attribute.GetTypeInfo(System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.GetIDsOfNames(System.Guid, System.IntPtr, System.UInt32, System.UInt32, System.IntPtr)
System.Attribute.System.Runtime.InteropServices._Attribute.Invoke(System.UInt32, System.Guid, System.UInt32, System.Int16, System.IntPtr, System.IntPtr, System.IntPtr, System.IntPtr)
System.Attribute.TypeId
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class PlugInPropertyAttribute : Attribute, _Attribute
Examples

Adding a setting for changing the root page for a special function.

        [PlugInProperty(Description = "Sets the root container.", AdminControl = typeof(InputPageReference), AdminControlValue = "PageLink")]
public PageReference EPiID
{
    get { return _epiID; }
    set { _epiID = value; }
}

Adding a setting for a boolean value with a checkbox as GUI.

        [PlugInProperty(Description = "Should we be enabled.", AdminControl = typeof(CheckBox), AdminControlValue = "Checked")]
public bool FunctionEnabled
{
    get { return _enabled; }
    set { _enabled = value; }
}

Constructors

PlugInPropertyAttribute()

Initializes a new instance of the PlugInPropertyAttribute class.

Declaration
public PlugInPropertyAttribute()

PlugInPropertyAttribute(String, String)

Initializes a new instance of the PlugInPropertyAttribute class.

Declaration
public PlugInPropertyAttribute(string name, string description)
Parameters
Type Name Description
System.String name

The name of the page extension.

System.String description

The description for the page extension.

Remarks

Initializes the DisplayName and Description properties as part of the initialization process. Unless you manually set the LanguagePath property you will not benefit from the automatic translation support in EPiServer.

PlugInPropertyAttribute(String, String, String)

Initializes a new instance of the PlugInPropertyAttribute class.

Declaration
public PlugInPropertyAttribute(string name, string description, string languagePath)
Parameters
Type Name Description
System.String name

The name of the page extension.

System.String description

The description for the page extension.

System.String languagePath

The language path to use when trying to look up translations for the DisplayName and Description properties.

Properties

AdminControl

Gets or sets the web control used for editing the property.

Declaration
public Type AdminControl { get; set; }
Property Value
Type Description
System.Type

The admin control.

Remarks

The type must be a class that inherits from System.Web.UI.WebControls.WebControl

AdminControlValue

Gets or sets the name of the property on AdminControl that contains the property value.

Declaration
public string AdminControlValue { get; set; }
Property Value
Type Description
System.String

The property name.

Remarks

When an edit view is created for the plugin property, the value for the AdminControl property named AdminControlValue is read and written to the property that this attribute instance is applied to.

Description

Description of the plugin property.

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

The description.

Remarks

If a LanguagePath has been defined, the return value for Description will be the translated text from LanguagePath + "/description"

DisplayName

The display name for the plugin property.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
System.String

A string with the display name.

Remarks

If a LanguagePath has been defined, the return value for DisplayName will be the translated text from LanguagePath + "/displayname"

LanguagePath

Path to node in language files where translation can be found.

Declaration
public string LanguagePath { get; set; }
Property Value
Type Description
System.String
Remarks

Set this property to the path of the XML element that contains the displayname and description elements in one of your language files (an xml file in the /lang directory.)

Implements

System.Runtime.InteropServices._Attribute

Extension Methods