Skip to main content
A newer version of this page is available. .

RepositoryItemAnyControl Class

Allows you to embed a ChartControl, GaugeControl or any custom control into cells of a container control (GridControl, TreeList, etc.).

Namespace: DevExpress.XtraEditors.CustomEditor

Assembly: DevExpress.XtraEditors.v18.1.dll

Declaration

[UserRepositoryItem("Register")]
public class RepositoryItemAnyControl :
    RepositoryItem

Remarks

The RepositoryItemAnyControl class is used to display a ChartControl, GaugeControl or any custom control within cells of a container control (GridControl, TreeList, etc.). A custom control to be embedded in a container control must implement the DevExpress.XtraEditors.CustomEditor.IAnyControlEdit interface (the ChartControl and GaugeControl implement the IAnyControlEdit interface out of the box).

This approach of embedding custom controls in containers is appropriate for static controls that do not require interaction from end-users (for instance, a chart, gauge, etc.). Embedding compound controls, including those that require end-user interaction, is not supported.

The steps to embed an IAnyControlEdit control (including the ChartControl and GaugeControl) in a container using the RepositoryItemAnyControl object are as follows:

  1. Create a RepositoryItemAnyControl object.
  2. Set its RepositoryItemAnyControl.Control property to an instance of the IAnyControlEdit control.
  3. Assign the RepositoryItemAnyControl to a column of a container control (e.g., with the GridColumn.ColumnEdit or TreeListColumn.ColumnEdit property
  4. Ensure that the RepositoryItemAnyControl object is added to the container control’s repository (see EditorContainer.RepositoryItems).

Examples

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

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.

Inheritance

See Also