Returns the current View Item’s control displayed in a UI.
NuGet Package: DevExpress.ExpressApp
An object that is the current View Item’s control displayed in a UI.
The Control property gets the control the CreateControlCore method returns. Handle the ViewItem.ControlCreating and/or ViewItem.ControlCreated event(s) to execute a custom functionality when this control is created.
When a View is created, all its View Item controls are initialized immediately by default. This behavior ensures that you can rely on the View.ControlsCreated and ViewController.ViewControlsCreated events when accessing a View Item’s control. However, complex Views with many controls may take a long time to open. To speed up this process, set the XafApplication.DelayedViewItemsInitialization property to true. This ensures that only controls visible to end-users, initialize. Note, that in this instance, you should make sure that your code is not accessing View Items’ controls before they are created, because you can no longer rely on the View.ControlsCreated and ViewController.ViewControlsCreated events alone. For additional information, refer to the XafApplication.DelayedViewItemsInitialization property description.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Control property.
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.