Markup Extensions |
A Markup extension is a way to assign logic to a property instead of a plain value.
Markup extensions in xml code are wrapped in curly brackets (see example below).
< Button IsVisible="{Binding Path=CurrentElement.IsClickable, Converter=Invert, RelativeSource=SecondaryHand}" />
Here, the markup extension Binding is assigned to the IsVisible property of a Button. Path, Converter and RelativeSource are parameters of Binding. The parameters of a markup extension can also contain markup extensions (see example below).
{Calc Arg1=5, Arg2={Binding Path=Parameters.Param_Methanol.Value, ElementId=HeatPlate}, Operation=Add}" />
Whenever a child markup extension value changes, the parent markup extension value is recalculated using the new value of the child markup extension.