Table of Contents

Class ConditionalExpression

Namespace
Microsoft.Xaml.Behaviors.Core
Assembly
Microsoft.Xaml.Behaviors.dll

Represents a conditional expression that is set on a ConditionBehavior.Condition property. Contains a list of conditions that gets evaluated in order to return true or false for ICondition.Evaluate().

public class ConditionalExpression : Freezable, ICondition
Inheritance
ConditionalExpression
Implements

Constructors

ConditionalExpression()

Initializes a new instance of the ConditionalExpression class.

public ConditionalExpression()

Fields

ConditionsProperty

public static readonly DependencyProperty ConditionsProperty

Field Value

DependencyProperty

ForwardChainingProperty

public static readonly DependencyProperty ForwardChainingProperty

Field Value

DependencyProperty

Properties

Conditions

Return the Condition collections.

public ConditionCollection Conditions { get; }

Property Value

ConditionCollection

ForwardChaining

Gets or sets forward chaining for the conditions. If forward chaining is set to ForwardChaining.And, all conditions must be met. If forward chaining is set to ForwardChaining.Or, only one condition must be met.

public ForwardChaining ForwardChaining { get; set; }

Property Value

ForwardChaining

Methods

CreateInstanceCore()

protected override Freezable CreateInstanceCore()

Returns

Freezable

Evaluate()

Goes through the Conditions collection and evalutes each condition based on ForwardChaining property.

public bool Evaluate()

Returns

bool

Returns true if conditions are met; otherwise, returns false.