z:Bind
is a xaml
markup extension for Xamarin.Forms
that allows you to bind directly to an expression
If you want to do things like this: (note the expression is enclosed inside quotes)
<StackLayout
IsVisible="{z:Bind '(Item.Count != 0) AND (Status == \'Administrator\')'}" > ...
- Install
FunctionZero.zBind
to your shared project - add
xmlns:z="clr-namespace:FunctionZero.zBind.z;assembly=FunctionZero.zBind"
To yourxaml
page (or let Visual Studio do it for you) - That's all you need to do :)
Head over here for source code, documentation and a sample application