Table of Contents

Class ComparisonCondition

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

Represents one ternary condition.

public class ComparisonCondition : Freezable
Inheritance
ComparisonCondition

Constructors

ComparisonCondition()

public ComparisonCondition()

Fields

LeftOperandProperty

public static readonly DependencyProperty LeftOperandProperty

Field Value

DependencyProperty

OperatorProperty

public static readonly DependencyProperty OperatorProperty

Field Value

DependencyProperty

RightOperandProperty

public static readonly DependencyProperty RightOperandProperty

Field Value

DependencyProperty

Properties

LeftOperand

Gets or sets the left operand.

public object LeftOperand { get; set; }

Property Value

object

Operator

Gets or sets the comparison operator.

public ComparisonConditionType Operator { get; set; }

Property Value

ComparisonConditionType

RightOperand

Gets or sets the right operand.

public object RightOperand { get; set; }

Property Value

object

Methods

CreateInstanceCore()

protected override Freezable CreateInstanceCore()

Returns

Freezable

Evaluate()

Method that evaluates the condition. Note that this method can throw ArgumentException if the operator is incompatible with the type. For instance, operators LessThan, LessThanOrEqual, GreaterThan, and GreaterThanOrEqual require both operators to implement IComparable.

public bool Evaluate()

Returns

bool

Returns true if the condition has been met; otherwise, returns false.