Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

WinPropertyEditor Class

Represents a base class for Windows Forms Property Editors.

Namespace: DevExpress.ExpressApp.Win.Editors

Assembly: DevExpress.ExpressApp.Win.v22.1.dll


public abstract class WinPropertyEditor :


Inherit from this class, to implement a custom Windows Forms Property Editor using a standard control that supports binding. If the control does not support binding, inherit from the PropertyEditor class. To implement a custom Property Editor based on a control derived from BaseEdit, inherit from the DXPropertyEditor class.

Compared to the PropertyEditor class, the WinPropertyEditor class introduces additional members:

Member Description
WinPropertyEditor.Control Provides access to the control that represents the current Property Editor in a UI.
WinPropertyEditor.ControlBindingProperty Specifies the control’s property that is used for data binding.
WinPropertyEditor.TextControlHeight Returns the default control height in pixels. Used by the XAF built-in Property Editors.

The simplest implementation of the WinPropertyEditor class’ descendant requires the following:

  • Override the CreateControlCore method. Create and return an instance of the required control in this method.
  • Determine which event of the control occurs when the editing value is changed by a user (refer to the control’s documentation to find the appropriate event). Subscribe to this event and call the OnControlValueChanged method from the event handler.
  • Specify the WinPropertyEditor.ControlBindingProperty value in the constructor or in the CreateControlCore method.
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Win.Editors;
// ...
[PropertyEditor(typeof(int), false)]
public class MyPropertyEditor : WinPropertyEditor {
    public MyPropertyEditor(Type objectType, IModelMemberViewItem model) : base(objectType, model) { }
    protected override object CreateControlCore() {
        System.Windows.Forms.TrackBar trackbarControl = new System.Windows.Forms.TrackBar();
        trackbarControl.Minimum = 0;
        trackbarControl.Maximum = 100;
        trackbarControl.Scroll += trackbarControl_Scroll;
        this.ControlBindingProperty = "Value";
        return trackbarControl;
    void trackbarControl_Scroll(object sender, EventArgs e) {


Set the CanUpdateControlEnabled protected property to true in the constructor of your custom Property Editor if it is required to update the Control.Enabled property value (e.g., when the underlying control is created or the PropertyEditor.AllowEdit property is changed).

The following code snippets (auto-collected from DevExpress Examples) contain references to the WinPropertyEditor class.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.


See Also