FunctionZero
  • Libraries
    • Maui.MvvmZero
      • Overview
      • Quickstart
      • Walkthrough
        • Create your application
        • Create your ContentPages
        • Create your ViewModels
        • Register your new content
        • Launching our app!
        • Adding Navigation
        • Summary
      • Recommended naming conventions
      • Configuring your root Page
        • Root ContentPage
        • Root NavigationPage
        • Root TabbedPage
        • Root FlyoutPage
      • A note on Singleton vs Transient
      • Recommended base classes for PageViewModels and ViewModels
    • Maui.Controls
      • ExpanderZero
      • FocusScrollZero
      • LabelZero
      • ListViewZero
      • MaskZero
      • MultiViewZero
      • TreeViewZero
    • CommandZero
    • Maui.BindZero
      • Quickstart
      • z:Bind
      • Examples
      • The Great Escape
      • Casting
      • Short Circuit
      • Errors
      • Aliases
      • Value types and Reference types
      • z:Function
      • z:TapTrigger
      • z:EdgeTrigger
      • z:Latch
      • Advanced Usage - Functions, aliases and operator-overloads
    • AnimationZero
    • LocalisationZero
Powered by GitBook
On this page
  1. Libraries
  2. Maui.BindZero

z:Function

z:Function is similar to, and has the same syntax as z:Bind It is different because it does not self-evaluate and instead relies on its consumer to ask it to evaluate z:Function can be consumed by TapTrigger, EdgeTrigger and Latch

Usage

TargetProperty = "{ z:Function <some expression>   [, Source=<some source>] }"

Where <some expression> is any valid expression, making use of properties on the BindingSource Typically you would put either an assignment into a z:Function

TapAction="{z:Function 'Things.TapCount = Things.TapCount + 1'}"

or a function call

TapAction="{z:Function 'OpenUrl(Customer.LoginUrl, Customer.UserName)'}"

or both ...

TapAction="{z:Function 'Things.TapCount = Things.TapCount + 1, OpenUrl(Customer.LoginUrl)'}"
PreviousValue types and Reference typesNextz:TapTrigger

Last updated 1 year ago