Table of Contents

Class VisibilityConditionWithDependency<TProperties>

Namespace
Kentico.Xperience.Admin.Base.Forms
Assembly
Kentico.Xperience.Admin.Base.dll

The base class for a visibility condition which evaluates a value of a different property.

public abstract class VisibilityConditionWithDependency<TProperties> : VisibilityCondition<TProperties>, IVisibilityCondition where TProperties : VisibilityConditionWithDependencyProperties, new()

Type Parameters

TProperties

Type of visibility condition properties.

Inheritance
object
VisibilityCondition<TProperties>
VisibilityConditionWithDependency<TProperties>
Implements
Derived
Inherited Members
Extension Methods

Remarks

The provided properties type must derive from VisibilityConditionWithDependencyProperties.

Properties

DependsOnFields

The list of fields the visibility condition evaluation depends on. Only dependencies on fields logically preceding the field this condition is associated with are supported.

public override IEnumerable<string> DependsOnFields { get; }

Property Value

IEnumerable<string>

Remarks

The implementation returns an empty enumeration. Override this member to return custom field names.

Methods

GetObjectValueOfDependency<TValue>(IFormFieldValueProvider)

Gets the object value of the dependency field.

protected TValue GetObjectValueOfDependency<TValue>(IFormFieldValueProvider formFieldValueProvider) where TValue : class

Parameters

formFieldValueProvider IFormFieldValueProvider

Form value provider.

Returns

TValue

Return value or null if not available.

Type Parameters

TValue

Type of the value to be returned.

Exceptions

InvalidOperationException

GetValueOfDependency<TValue>(IFormFieldValueProvider)

Gets the value of the dependency field.

protected TValue? GetValueOfDependency<TValue>(IFormFieldValueProvider formFieldValueProvider) where TValue : struct

Parameters

formFieldValueProvider IFormFieldValueProvider

Form value provider.

Returns

TValue?

Return value or null if not available

Type Parameters

TValue

Type of the value to be returned.

Exceptions

InvalidOperationException