State Triggers

Learn how to use .NET MAUI state triggers.

State triggers are fired when the state of some element changes. For example, we might have a trigger that monitors the screen orientation. The setter on the trigger will then rearrange the elements depending on whether the screen is in portrait or landscape mode. There might also be a trigger that monitors the state of a specific property on a specific element. For example, we might have a trigger that monitors the dimensions of the app window and hides some elements when it becomes too small. There are multiple types of state triggers in .NET MAUI, but they all follow similar principles.

We'll cover state triggers in .NET MAUI with the aid of the following project setup:

Get hands-on with 1200+ tech skills courses.