Table of Contents

Class VisibilityConditionAttribute

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Denotes that visibility of the decorated property in a form depends either on a value of another property or on a custom visibility condition. The other property value is utilized during evaluation of the given visibility condition to indicate whether the decorated property's form component should be visible in a form. Either predefined visibility condition via ComparisonTypeEnum or a custom visibility condition can be used. When utilizing the dependee property value, the custom visibility condition type must inherit from AnotherPropertyVisibilityCondition<TValue> to ensure correct functionality, otherwise VisibilityCondition can be used.

[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
[Obsolete("This API is only available for legacy Form Builder components that provide backward compatibility when transitioning from older versions. The API will be removed when support for the Form Builder compatibility mode is dropped.")]
public sealed class VisibilityConditionAttribute : Attribute
Inheritance
object
Attribute
VisibilityConditionAttribute
Extension Methods

Constructors

VisibilityConditionAttribute(string, ComparisonTypeEnum, params object[])

Initializes a new instance of the VisibilityConditionAttribute class.

public VisibilityConditionAttribute(string dependeePropertyName, ComparisonTypeEnum comparisonType, params object[] arguments)

Parameters

dependeePropertyName string

The name of the property the decorated property depends on.

comparisonType ComparisonTypeEnum

The comparison type.

arguments object[]

The additional comparison arguments.

VisibilityConditionAttribute(string, Type, string)

Initializes a new instance of the VisibilityConditionAttribute class.

public VisibilityConditionAttribute(string dependeePropertyName, Type visibilityConditionType, string conditionName = null)

Parameters

dependeePropertyName string

The name of the property the decorated property depends on.

visibilityConditionType Type

The visibility condition type.

conditionName string

Visibility condition name.

VisibilityConditionAttribute(Type, string)

Initializes a new instance of the VisibilityConditionAttribute class.

public VisibilityConditionAttribute(Type visibilityConditionType, string conditionName = null)

Parameters

visibilityConditionType Type

The visibility condition type.

conditionName string

Visibility condition name.

Properties

StringComparison

Determines string values comparison aspects.

public StringComparison StringComparison { get; set; }

Property Value

StringComparison