Class VisibleIfNotEqualToAttribute
- 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 not 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 VisibleIfNotEqualToAttribute : VisibilityConditionWithDependencyAttribute
- Inheritance
-
objectAttributeVisibleIfNotEqualToAttribute
- Inherited Members
- Extension Methods
Constructors
VisibleIfNotEqualToAttribute(string, object)
Creates an instance of VisibleIfNotEqualToAttribute. String values are compared using System.StringComparison.Ordinal.
public VisibleIfNotEqualToAttribute(string propertyName, object compareToValue)
Parameters
propertyName
stringDependent property name.
compareToValue
objectValue the dependent property value is compared against.
VisibleIfNotEqualToAttribute(string, string, StringComparison)
Creates an instance of VisibleIfNotEqualToAttribute.
public VisibleIfNotEqualToAttribute(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