IModelDisableReasons Interface

The DisableReasons node lists the disabling reasons for an Action, specifying a definition for each of them.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v18.1.dll

Declaration

[ImageName("ModelEditor_Actions_DisableReasons")]
public interface IModelDisableReasons :
    IModelNode,
    IModelList<IModelReason>,
    IList<IModelReason>,
    ICollection<IModelReason>,
    IEnumerable<IModelReason>,
    IEnumerable
<ImageName("ModelEditor_Actions_DisableReasons")>
Public Interface IModelDisableReasons
    Inherits IModelNode,
             IModelList(Of IModelReason),
             IList(Of IModelReason),
             ICollection(Of IModelReason),
             IEnumerable(Of IModelReason),
             IEnumerable

The ActionBase.Enabled property returns a collection of key reason/value pairs. When all the keys in this collections have true as a value, an Action is enabled. When an Action is disabled, a hint with the description of the disabling reason will appear. The reason is specified by the corresponding key.

By default, this node contains several reasons. You can use them when disabling an Action. If you specify a new reason in the Enabled.SetItemValue method call, specify the definition for it. To do this, add a new reason via the DisableReasons node's context menu or in code, and specify its IModelReason.Id and IModelReason.Caption properties.

This interface is a part of the Application Model infrastructure and is not intended to be implemented by your classes. To learn more, refer to the Application Model Structure topic.

The IModelDisableReasons node represents a list of the IModelReason nodes.

See Also