Skip to main content

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.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

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

Inheritance

Object
MarshalByRefObject
Component
DevExpress.XtraEditors.ComponentBase
RepositoryItem
RepositoryItemAnyControl
See Also