Skip to content

DisableIfAttribute

Namespace: SideXP.Core | Inherits from: PropertyAttribute

public class DisableIfAttribute : PropertyAttribute

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

Constructors

DisableIfAttribute(string)

public DisableIfAttribute(string propertyName)

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

Parameters

  • propertyName: The name of the property that shouldn't be checked.

Properties

PropertyName

public string PropertyName

The name of the boolean property that shouldn't be checked.

HideIfDisabled

public bool HideIfDisabled

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