.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

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.v20.2.dll


public Type TargetObjectType { get; set; }
<TypeConverter(GetType(BusinessClassTypeConverter(Of Object)))>
Public Property TargetObjectType As Type

Property Value

Type Description

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


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.

See Also