Map EPiServer properties to custom property controls
The PropertyControlClassFactory class makes it easy to map EPiServer properties to custom property controls to modify how properties are rendered.
If the standard EPiServer property controls don’t meet your requirements you can easily configure the standard EPiServer properties to use custom property controls through the PropertyControlClassFactory class.
using EPiServer.Core;
using EPiServer.SpecializedProperties;
namespace My.Website
{
/// <summary>
/// Maps EPiServer property types to our own property control types
/// </summary>
public class PropertyControlsSetup : EPiServer.PlugIn.PlugInAttribute
{
public static void Start()
{
PropertyControlClassFactory.Instance.RegisterClass(typeof(PropertyString), typeof(My.Website.PropertyStringControl));
PropertyControlClassFactory.Instance.RegisterClass(typeof(PropertyLongString), typeof(My.Website.PropertyLongStringControl));
PropertyControlClassFactory.Instance.RegisterClass(typeof(PropertyXhtmlString), typeof(My.Website.PropertyXhtmlStringControl));
}
}
}