DetailViewExtensions.CustomizeViewItemControl(DetailView, Controller, Action<ViewItem>) Method
Allows you to access and customize controls of View Items the specified Detail View contains.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
#Declaration
public static void CustomizeViewItemControl(
this DetailView view,
Controller controller,
Action<ViewItem> customizeAction
)
#Parameters
Name | Type | Description |
---|---|---|
view | Detail |
A Detail |
controller | Controller | A Controller to customize controls of View Items. |
customize |
Action<View |
A method to customize controls of View Items. |
#Remarks
The following code shows how to use this method.
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using DevExpress.XtraEditors;
// ...
public class SetMinValueController : ObjectViewController<DetailView, DemoTask> {
protected override void OnActivated() {
base.OnActivated();
View.CustomizeViewItemControl(this, SetMinValue);
}
private void SetMinValue(ViewItem viewItem) {
SpinEdit spinEdit = viewItem.Control as SpinEdit;
if (spinEdit != null) {
spinEdit.Properties.MinValue = 0;
}
}
}