Skip to main content
.NET 6.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.v24.1.dll

NuGet Package: DevExpress.ExpressApp

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.

See Also