Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class PropertyDataExtension

Extends PropertyData with convenient methods

Inheritance
System.Object
PropertyDataExtension
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class PropertyDataExtension

Methods

CreatePropertyControl(PropertyData)

Creates an IPropertyControl that is used to display a user interface for the property.

Declaration
[Obsolete("Use IPropertyControlFactory to cretate property controls")]
public static IPropertyControl CreatePropertyControl(this PropertyData property)
Parameters
Type Name Description
PropertyData property
Returns
Type Description
IPropertyControl

An IPropertyControl that is used to display a user interface for the property.

Remarks

It is possible to change which control should be used by registering a different IPropertyControl for the PropertyData class in PropertyControlClassFactory.

GetSetting(PropertyData, Type)

Gets a custom settings object if specified by either PropertyDefinition or PropertyControl.

Declaration
[Obsolete("This method does not support typed property settings. Use extension method myContent.GetPropertySettings<IPropertySettings, PageWithPropertySettings>(p => p.MainBody) or PropertySettingsResolver to resolve property settings.")]
public static IPropertySettings GetSetting(this PropertyData property, Type settingsType)
Parameters
Type Name Description
PropertyData property
System.Type settingsType
Returns
Type Description
IPropertySettings

Replaces the HTML links.

Declaration
[Obsolete("This method is no longer in use and will be removed in a future release. It will not be replaced")]
public static string ReplaceHtmlLinks(this PropertyData property, string html, PropertyData.TranslateUri translateUri)
Parameters
Type Name Description
PropertyData property
System.String html
PropertyData.TranslateUri translateUri
Returns
Type Description
System.String

A string where the html links have been replaced.