z:Bind
Used to DataBind to an Expression. If the Expression is just a property-name then it is equivalent to Binding
A z:Bind
automatically updates if any referenced properties notify they have changed
Usage
Source property
Just like a standard Binding
, the data-source is the current BindingContext, unless Source
is specified.
If this data-source supports INotifyPropertyChanged
, changes will be tracked.
z:Bind Expressions
{z:Bind Count}
BindingContext
Bind to Count
, same as Binding
{z:Bind Count * 2}
BindingContext
Bind to an expression that yields Count * 2
{z:Bind '(Delta.X < 0.2) && (Delta.X > -0.2)' }
BindingContext
True if (Delta.X < 0.2) && (Delta.X > -0.2)
{z:Bind '(Delta.X LT 0.2) AND (Delta.X GT -0.2)' }
BindingContext
As above, using aliases instead of escape-sequences
{z:Bind (Count * 2) LT 10}
BindingContext
True if (Count * 2) < 10
{z:Bind Sin(Count / 25.0)}
BindingContext
Calls a function (see below)
{z:Bind 'Value LT 0.2', Source={x:Reference MySlider}}
An Element called MySlider
True if MySlider.Value
< 0.2
Last updated