Table of Contents

Class VisibleIfEqualToAttribute

Namespace
Kentico.Xperience.Admin.Base.FormAnnotations
Assembly
Kentico.Xperience.Admin.Base.Shared.dll

Indicates that the decorated property appears in editing form only if a value of a property given by PropertyName is equal to a value given by CompareToValue. If Comparison is set, values are compared as strings using that comparator, otherwise System.StringComparison.Ordinal is used. If values to compare are arrays then their elements are compared regardless the order. Otherwise values are compared using object.Equals(object, object) method.

public class VisibleIfEqualToAttribute : VisibilityConditionWithDependencyAttribute
Inheritance
object
Attribute
VisibleIfEqualToAttribute
Inherited Members
Extension Methods

Constructors

VisibleIfEqualToAttribute(string, object)

Creates an instance of VisibleIfEqualToAttribute. String values are compared using System.StringComparison.Ordinal.

public VisibleIfEqualToAttribute(string propertyName, object compareToValue)

Parameters

propertyName string

Dependent property name.

compareToValue object

Value the dependent property value is compared against.

VisibleIfEqualToAttribute(string, string, StringComparison)

Creates an instance of VisibleIfEqualToAttribute.

public VisibleIfEqualToAttribute(string propertyName, string compareToValue, StringComparison comparison)

Parameters

propertyName string

Dependent property name.

compareToValue string

Value the dependent property value is compared against.

comparison StringComparison

String comparison mode.

Properties

CompareToValue

Value the dependent property value is compared against.

public object CompareToValue { get; }

Property Value

object

Comparison

String comparison.

public StringComparison Comparison { get; }

Property Value

StringComparison