Click or drag to resize

Binding

A Binding obtains the value of a property specified by a path and other parameters.

Example
                  <
                  Button IsVisible="{Binding Path=CurrentElement.IsClickable, Converter=Invert, RelativeSource=SecondaryHand}" />
Parameters
  • Path (default) : string

    List of properties to access in order to obtain a target value, separated by dots. Can also contain the names to be used in lookups.

    Example
    {Binding Path=Parameters.Param_Methanol.Value, ElementId=HeatPlate}

    In the example above, Parameters and Value are property names, Param_Methanol is the name of the parameter used as key of a Parameters dictionary.

  • ElementId : string

    Id of the element that will be the source of the binding (the object on which the first property of Path will be resolved).

    Example
    {Binding Path=Parameters.Param_Methanol.Value, ElementId=HeatPlate}

    In the example above, the element Parameters property will be taken from the element with the HeatPlate Id.

  • ItemId : string

    Id of the item that will become the source of binding (all items with specified Id become a source, therefore the binding will return multiple values).

    Example
    {Binding Contents.CurrentContentTypes, ItemId=FalconTube}

    In the example above, we bind to all elements with ItemId FalconTube.

  • Source : object

    Source of the binding.

    Example
    {Binding Path=CurrentElement, Source={RelativeSource AncestorLevel=1}}

    In the example above, we bind to the parent's CurrentElement property ({RelativeSource AncestorLevel=1} returns the parent of the element with binding, which then becomes the source of the binding).

  • RelativeSource : string

    Source of a binding specified as one of predefined values.

    Allowed values:

    • CurrentHand
    • DropTarget
    • LeftHand
    • RightHand
    • FreeHand
    • PrimaryHand
    • SecondaryHand
    Example
    {Binding CurrentElement.Contents.CurrentContentTypes, RelativeSource=PrimaryHand}
  • Converter : IValueConverter

    Converter that will be called every time the binding value is retrieved.

    Allowed values:

    • Invert
    • Evaluate
    • ToInt
    • ToDouble
    • ToBoolean
    • LinearToLog
    • LogToLinear
    • EqualsTo
    • NotEqualsTo
    • Contains
    • NotContains
    • GreaterThan
    • GreaterThanOrEqual
    • LessThan
    • LessThanOrEqual
    Example
    {Binding ActiveStates, Converter=Contains, ConverterParameter=N2}
  • ConverterParameter : object

    Parameter to be used by the converter.

  • StringFormat : string

    Format string to be used for binding value.

    Example
    {Binding Parameters.Stirrerrate.Value, StringFormat={0:0}%, ElementId=FermentorLiquid}