Skip to main content
.NET Standard 2.0+

IComplexViewItem Interface

Declares members implemented by View Items that have access to the XafApplication object and IObjectSpace of the current View.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v22.1.dll


public interface IComplexViewItem


When implementing a custom Property Editor or a custom View Item you may want to:

In these scenarios, a View Item or Property Editor requires access to the application object and to the Object Space of the current View. To get these objects, the Property Editor should support the IComplexViewItem interface. This interface exposes a single IComplexViewItem.Setup method that accepts objectSpace and application parameters. This method is called automatically for all IComplexViewItem View Items when a View is shown.

Here is an example of how to implement IComplexViewItem in a PropertyEditor descendant:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
// ...
public class CustomPropertyEditor : PropertyEditor, IComplexViewItem {
    private IObjectSpace objectSpace;
    private XafApplication application;

    #region IComplexViewItem Members
    void IComplexViewItem.Setup(IObjectSpace objectSpace, 
XafApplication application) {
        this.objectSpace = objectSpace;
        this.application = application;

    // Example:
    protected override object CreateControlCore() {
        IList dataSource = objectSpace.GetObjects(Model.ModelMember.Type);
        // ...

The following code snippets (auto-collected from DevExpress Examples) contain references to the IComplexViewItem interface.


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.

See Also