Back to Devexpress

ChoiceActionBase.Items Property

expressappframework-devexpress-dot-expressapp-dot-actions-dot-choiceactionbase.md

latest3.1 KB
Original Source

ChoiceActionBase.Items Property

Specifies a Choice Action’s item collection.

Namespace : DevExpress.ExpressApp.Actions

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public ChoiceActionItemCollection Items { get; }
vb
Public ReadOnly Property Items As ChoiceActionItemCollection

Property Value

TypeDescription
ChoiceActionItemCollection

A ChoiceActionItemCollection object that represents a collection of a Choice Action’s items.

|

Remarks

The ChoiceActionItemCollection contains items that can, themselves, contain a collection of items. So, you can specify a tree of items for the current Choice Action. For this purpose, use the Items property. The most convenient way to specify this property is to use the Properties window, where an ellipsis button is attached to this property. Alternatively, you can do it in code (see Add an Action with Option Selection).

To detect if the Items collection is tree-like, use the ChoiceActionBase.IsHierarchical method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Items 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-execute-actions-in-code/CS/XPO/ExecuteAction/ExecuteAction.Module/Controllers/ActionInvokerViewController.cs#L54

csharp
if (newObjectViewController != null) {
    newObjectViewController.NewObjectAction.DoExecute(newObjectViewController.NewObjectAction.Items[0]);
}

See Also

ChoiceActionBase Class

ChoiceActionBase Members

DevExpress.ExpressApp.Actions Namespace