System.Object Value { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Value property of the HideIfAttribute class specifies the value to test against when determining whether a property should be hidden in the editor. This property is used in conjunction with the PropertyName property to define a condition under which the associated property will be hidden from view in the editor interface.

Usage

To use the Value property, you must first apply the HideIfAttribute to a property within a class. Specify the PropertyName that you want to test and the Value that the property should be compared against. If the specified property has the specified value, the property with the HideIfAttribute will be hidden in the editor.

Example

// Example usage of HideIfAttribute
public class MyComponent : Component
{
    [HideIf("IsEnabled", true)]
    public int HiddenProperty { get; set; }

    public bool IsEnabled { get; set; }
}