Skip to main content
.NET Framework 4.5.2+

DetailViewExtensions.CustomizeViewItemControl<T>(DetailView, Controller, Action<T>) Method

Allows you to access controls of View Items the specified Detail View contains.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v22.1.dll

Declaration

public static void CustomizeViewItemControl<T>(
    this DetailView view,
    Controller controller,
    Action<T> customizeAction
)
    where T : ViewItem

Parameters

Name Type Description
view DetailView

A DetailView that contains the View Items whose controls the customizeAction method customizes.

controller Controller

A Controller to customize controls of View Items.

customizeAction Action<T>

A method to customize controls of View Items.

Type Parameters

Name Description
T

The type of View Items.

Remarks

The following code shows how to use this method to customize controls of Date Property Editors.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Win.Editors;
// ...
public class CustomizeDateEditorController : ObjectViewController<DetailView, DemoTask> {
    protected override void OnActivated() {
        base.OnActivated();
        View.CustomizeViewItemControl<DatePropertyEditor>(this, CustomizeDateEditor);
    }
    private void CustomizeDateEditor(DatePropertyEditor propertyEditor) {
        propertyEditor.Control.Properties.ShowWeekNumbers = true;
    }
}

The following image demonstrates how this Controller affects the UI.

See Also