Click or drag to resize

ConditionalSelector

A ConditionalSelector allows to choose one value out of two depending on the value of a boolean parameter.

Example
                  <
                  Field Value="{ConditionalSelector True={Binding ElementId=Container1}, False={Binding ElementId=Container2}, Condition={Calc Arg1={Binding Path=Contents.Amount, ElementId=Container1}, Arg2={Binding Path=Contents.Amount, ElementId=Container2}, Operation=GreaterThan}}" />
Parameters
  • True : object

    Value to be used if Condition parameter is true.

  • False : object

    Value to be used if the Condition parameter is false.

  • Trued : double

    Value to be used if the Condition parameter is true and the value type is a number.

    An additional pair of parameters, Trued and Falsed, is created so that the parameter value set in xml is parsed into double. If a number is specified in xml for the True parameter, its value would be of type string.

    Parameters from different pairs cannot be mixed in one ConditionalSelector expression.

  • Falsed : double

    Value to be used if Condition parameter is false and value type is a number.

  • Condition : bool

    Boolean value that determines which value the selector should choose.