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
-
objectAttributeVisibleIfEqualToAttribute
- 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
stringDependent property name.
compareToValue
objectValue 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
stringDependent property name.
compareToValue
stringValue the dependent property value is compared against.
comparison
StringComparisonString 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