The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ViewItem.ControlCreating Event

Occurs before a control is created for the current View Item.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public event EventHandler<EventArgs> ControlCreating
Public Event ControlCreating As EventHandler(Of EventArgs)
public event EventHandler<EventArgs> ControlCreating
Public Event ControlCreating As EventHandler(Of EventArgs)
public event EventHandler<EventArgs> ControlCreating
Public Event ControlCreating As EventHandler(Of EventArgs)

Event Data

The ControlCreating event handler receives an argument of the EventArgs type.

Remarks

A View Item represents a non-visual entity that contains a certain functionality related to an item in a Detail View. To be represented in a UI, a control is created for it. This event is raised as a result of calling the ViewItem.CreateControl method of the current View Item. Handle it, to perform custom actions before a control is created.

To customize the control after it has been created, handle the ViewItem.ControlCreated event.

By default, View Items' controls are initialized immediately, when a View is created. This behavior ensures that you can rely on the View.ControlsCreated and ViewController.ViewControlsCreated events when accessing a View Item's control. The downside is that this behavior is slower. You can change this behavior, to speed up creation of complex Views, by setting the XafApplication.DelayedViewItemsInitialization property to true. This will ensure that View Items' controls are initialized only when they are visible to end-users. However, in this instance you can no longer rely on the View.ControlsCreated and ViewController.ViewControlsCreated events alone and should additionally ensure that your code is not accessing View Items' controls before they are created. For additional information, refer to the XafApplication.DelayedViewItemsInitialization property description.

See Also