SaaS CMS has officially launched! Learn more now.

Class PropertySettingsAttribute

Attibute to specify a settings object for Properties and PropertyControls.

Inheritance
System.Object
System.Attribute
PropertySettingsAttribute
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.Core.PropertySettings
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
[AttributeUsage(AttributeTargets.Class)]
public sealed class PropertySettingsAttribute : Attribute, _Attribute
Remarks

Use this attibute to specify properties or property controls that need to store settings on the page definition level.

Examples

Simple example of marking a property control with a settings attibute:

You can then use it together with a PropertySettingsUIAttribute:

Constructors

PropertySettingsAttribute(Type)

Initializes a new instance of the PropertySettingsAttribute class.

Declaration
public PropertySettingsAttribute(Type settingsType)
Parameters
Type Name Description
System.Type settingsType

Type of settings entity to use.

PropertySettingsAttribute(Type, Boolean)

Initializes a new instance of the PropertySettingsAttribute class.

Declaration
public PropertySettingsAttribute(Type settingsType, bool useGlobals)
Parameters
Type Name Description
System.Type settingsType

Type of settings entity to use.

System.Boolean useGlobals

if set to true enable multiple global settings to choose from in the admin UI.

Properties

SettingsType

Gets or sets the type of settings entity.

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

The type of the settings.

UseGlobals

Gets or sets a value indicating whether to enable multiple global settings to choose from in the admin UI.

Declaration
public bool UseGlobals { get; set; }
Property Value
Type Description
System.Boolean

true if enabled; otherwise, false.

Methods

TryGetAttribute(Type, out PropertySettingsAttribute)

Tries to get a PropertySettingsAttribute from a type.

Declaration
public static bool TryGetAttribute(Type type, out PropertySettingsAttribute attribute)
Parameters
Type Name Description
System.Type type

The type.

PropertySettingsAttribute attribute

The attribute to set if succesfull.

Returns
Type Description
System.Boolean

true if an attribute was found.

Implements

System.Runtime.InteropServices._Attribute

Extension Methods