liveBook · Manning

Trigger

As explained in .NET MAUI in Action

An event trigger is a .NET MAUI trigger that responds to an event raised by a control and does not automatically revert its applied change.

An event trigger is a .NET MAUI XAML trigger that responds when a control raises an event. Unlike property and data triggers, it does not automatically revert the change made through its Setter. section 10.2.1

Distinguish event triggers from the triggers used for state-based UI behavior:

  • Property triggers react to a condition on a control property and revert the Setter change when the condition ends. section 10.2.1
  • Data triggers react to a property on a control or binding context and can enable or disable controls as application state changes. section 10.2.1
  • Event triggers are appropriate when an event should apply a change without automatic reversal. section 10.2.1

How .NET MAUI in Action covers it

How deep it goes
Defines non-reverting event-trigger behavior and contrasts it with reverting property and data triggers, without showing event-trigger syntax.
Examples
Contrasts event triggers with data-triggered validation behavior that disables a Stepper or Button.
What it assumes
Assumes familiarity with XAML controls and Setter-based property changes while distinguishing property and data conditions.
What you can do after
Evaluate whether an event trigger fits UI behavior that should not automatically reverse its applied change.
How it connects
Connects event triggers with XAML, Setter, property triggers, data triggers, controls, and binding context.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.