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

ActionBase.TargetObjectType Property

Specifies the type of the object(s) that must be represented by the current View to provide an Action activation.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

[DefaultValue(null)]
[TypeConverter(typeof(BusinessClassTypeConverter<object>))]
public Type TargetObjectType { get; set; }

Property Value

Type Default Description
Type *null*

The Type of the object(s) for which the current Action is intended.

Remarks

If an Action is contained in a View Controller, you can specify the kind of the type of object(s) for which the Action will be activated. For this purpose, use the TargetObjectType property. By default, this property is not set. You can set a value in the Controller’s constructor or Designer. This value will be saved to the Application Model‘s IModelAction node.

To make a single Action available in Views of different business object types simultaneously, set the TargetObjectType property in code to an interface or their base class type, which is implemented or inherited by all these business types respectively. Alternatively, for the same task, you can specify several View identifiers via the ActionBase.TargetViewId property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TargetObjectType property.

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.

See Also