HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

The text editor in edit view will have limited length configured in the **Custom Settings** tab.

First you need to create a settings class, `CustomStringSettings`. It has a `Width` property that will be used to control the input max length. The class requires the associated UI control for editing model properties, `CustomStringSettingsControl`. The control is defined in `PropertySettingUI` attribute.

The `CustomSettingsControl` must implement `IPropertySettingsUI` interface or derive from `PropertySettingControlBase`. In this example, the control has simple `UserControl` (_CustomStringSettingsUI.ascx_) which contains a textbox to read/write the `Width` property.

The settings class is used by `StringProperty`, and that is why we need to assign it to the class inheriting from `PropertyString` and then register it in `PropertyControlClassFactory`.

To reuse the `Width` setting, we need to prepare the `EditorDescriptor` for the string type. It will read the value from `SettingsRepository` and pass it on to the client widget.