Loading...
Searching...
No Matches
OFT.Attributes.EnabledWhenAttribute Class Reference

Keeps the property editable only when the specified source property's value matches one of the provided values; otherwise the editor is disabled (greyed out) in the settings UI. Mirrors VisibleWhenAttribute but disables the editor instead of hiding the row — use this when the property should stay visible so the user knows it exists, yet cannot be changed in the current mode. More...

Inheritance diagram for OFT.Attributes.EnabledWhenAttribute:
[legend]
Collaboration diagram for OFT.Attributes.EnabledWhenAttribute:
[legend]

Public Member Functions

 EnabledWhenAttribute (string propertyName, params object[] values)
 

Properties

string PropertyName [get]
 Name of the source property whose value determines the editable state.
 
object[] Values [get]
 The set of values for which this property is editable. If the source property's current value is in this set, the property is editable; otherwise its editor is disabled (greyed out).
 

Detailed Description

Keeps the property editable only when the specified source property's value matches one of the provided values; otherwise the editor is disabled (greyed out) in the settings UI. Mirrors VisibleWhenAttribute but disables the editor instead of hiding the row — use this when the property should stay visible so the user knows it exists, yet cannot be changed in the current mode.

Constructor & Destructor Documentation

◆ EnabledWhenAttribute()

OFT.Attributes.EnabledWhenAttribute.EnabledWhenAttribute ( string  propertyName,
params object[]  values 
)
Parameters
propertyNameName of the source property whose value controls the editable state.
valuesAllowed values of the source property for this property to be editable.

Property Documentation

◆ PropertyName

string OFT.Attributes.EnabledWhenAttribute.PropertyName
get

Name of the source property whose value determines the editable state.

◆ Values

object [] OFT.Attributes.EnabledWhenAttribute.Values
get

The set of values for which this property is editable. If the source property's current value is in this set, the property is editable; otherwise its editor is disabled (greyed out).


The documentation for this class was generated from the following file: