expressappframework-devexpress-dot-expressapp-dot-editors-dot-viewitem-620fb71f.md
Occurs after a control has been created for the current View Item.
Namespace : DevExpress.ExpressApp.Editors
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public event EventHandler<EventArgs> ControlCreated
Public Event ControlCreated As EventHandler(Of EventArgs)
The ControlCreated event's data class is EventArgs.
Handle the ControlCreated event to modify a View Item‘s Control after it is created in a Detail View. For an example, see the following help topic: Ways to Access UI Elements and Their Controls.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ControlCreated event.
Note
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.
if (SourceItem != null) {
SourceItem.ControlCreated += SourceItem_ControlCreated;
}
ObjectSpace.ObjectChanged += ObjectSpace_ObjectChanged;
View.FindItem("TestString").ControlCreated += ChangeMaskControllerBase_ControlCreated;
}
XAF-search-objects-using-complex-criterion/CS/Dennis.Search.Win/SearchObjectViewController.cs#L43
if(editor.PropertyName == SearchResultsCollectionName)
editor.ControlCreated += new EventHandler<EventArgs>(editor_ControlCreated);
RefreshController refreshController = Frame.GetController<RefreshController>();
else {
lpe.ControlCreated += new EventHandler<EventArgs>(lpe_ControlCreated);
}
AddHandler ObjectSpace.ObjectChanged, AddressOf ObjectSpace_ObjectChanged
AddHandler View.FindItem("TestString").ControlCreated, AddressOf Me.ChangeMaskControllerBase_ControlCreated
End Sub
XAF-search-objects-using-complex-criterion/VB/Dennis.Search.Win/SearchObjectViewController.vb#L54
For Each editor As ListPropertyEditor In dv.GetItems(Of ListPropertyEditor)()
If Equals(editor.PropertyName, SearchResultsCollectionName) Then AddHandler editor.ControlCreated, New EventHandler(Of EventArgs)(AddressOf editor_ControlCreated)
Next
Else
AddHandler lpe.ControlCreated, New EventHandler(Of EventArgs)(AddressOf lpe_ControlCreated)
End If
See Also