Back to Devexpress

ActionBase.TargetViewNesting Property

expressappframework-devexpress-dot-expressapp-dot-actions-dot-actionbase-0d57c17a.md

latest4.5 KB
Original Source

ActionBase.TargetViewNesting Property

Specifies whether the View, for which an Action is intended, must be root, nested or any.

Namespace : DevExpress.ExpressApp.Actions

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[DefaultValue(Nesting.Any)]
public Nesting TargetViewNesting { get; set; }
vb
<DefaultValue(Nesting.Any)>
Public Property TargetViewNesting As Nesting

Property Value

TypeDefaultDescription
NestingAny

A Nesting enumeration value identifying a View kind.

|

Available values:

NameDescription
Any

An Action or a View Controller will be activated in Frames (Windows) with any Views.

| | Root |

An Action or a View Controller will be activated in Frames (Windows) which contain root Views (see View.IsRoot).

| | Nested |

An Action or a View Controller will be activated in Frames (Windows) which contain nested Views (the View.IsRoot property is set to false ).

|

Remarks

If an Action is contained in a View Controller, you can specify the kind of a View for which the Action will be activated via the TargetViewNesting property. By default, this property is set to Any. You can set another value in the Controller’s constructor or Designer. This value will be saved to the Application Model‘s ActionDesign | Actions | <Action> node.

The following code snippets (auto-collected from DevExpress Examples) contain references to the TargetViewNesting 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.

xaf-how-to-import-data-in-xaf/CS/XPO/ImportData/ImportData.Module/Controllers/ImportDataListViewController.cs#L28

csharp
var importInMainView = new SimpleAction(this, "ImportInMainView", PredefinedCategory.RecordEdit);
importInMainView.TargetViewNesting = Nesting.Root;
importInMainView.Execute += ImportInMainView_Execute;

XAF-search-objects-using-complex-criterion/CS/EFCore/ComplexSearchEF/ComplexSearchEF.Module/Controllers/MyShowSearchController.cs#L11

csharp
var mypopAction1 = new PopupWindowShowAction(this, "MyShowSearchAction", PredefinedCategory.Edit);
mypopAction1.TargetViewNesting = Nesting.Root;
mypopAction1.CustomizePopupWindowParams += MyAction1_CustomizePopupWindowParams;

See Also

TargetObjectType

TargetViewId

TargetViewType

Define the Scope of Controllers and Actions

ActionBase Class

ActionBase Members

DevExpress.ExpressApp.Actions Namespace