> For the complete documentation index, see [llms.txt](https://functionzero.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://functionzero.gitbook.io/docs/libraries/maui.bindzero/z-edgetrigger.md).

# z:EdgeTrigger

z:EdgeTrigger is a *Behaviour* that evaluates a 'Rising' or 'Falling' `z:Function` when a *Condition* changes

**Usage**

```
<ContentPage.Behaviors>
    <z:EdgeTrigger 
        Condition="<some z:Bind>" 
        Rising="<some z:Function>"
        Falling="<some z:Function>" />
</ContentPage.Behaviors>
```

For example, to show or hide UI based on a *player data* found in the *ViewModel*

```
<ContentPage.Behaviors>
    <z:EdgeTrigger 
        Condition="{z:Bind '(Player.Score GTE 50) AND (Player.IsVerified == true)'}" 
        Rising="{z:Function 'IsVisible=true', Source={x:Reference TheAchevementUi}}"
        Falling="{z:Function 'IsVisible=false', Source={x:Reference TheAchevementUi}}" />
</ContentPage.Behaviors>
```
