Skip to content

EnableIfAttribute

Namespace: SideXP.Core | Inherits from: PropertyAttribute

public class EnableIfAttribute : PropertyAttribute

Makes a field enabled only if a named boolean field or property is checked.

Constructors

EnableIfAttribute(string)

public EnableIfAttribute(string propertyName)

Makes a field enabled only if a named boolean field or property is checked.

Parameters

  • propertyName: The name of the field or property that should be checked.

Properties

PropertyName

public string PropertyName

The name of the boolean field or property that should be checked.

HideIfDisabled

public bool HideIfDisabled

If enabled, the field is hidden if the condition is not fulfilled, instead of being just disabled.