Event Triggers
Learn .NET MAUI event triggers.
We'll cover the following...
Event triggers are fired when a particular event occurs. An event may be triggered by a user's action, such as a button click. Or it may be triggered by an automated process, such as the completion of a certain long-running action. We'll cover event triggers in .NET MAUI with the aid of the following project setup:
<?xml version = "1.0" encoding = "UTF-8" ?> <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:EventTriggerDemo" x:Class="EventTriggerDemo.App"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources/Styles/Colors.xaml" /> <ResourceDictionary Source="Resources/Styles/Styles.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
.NET MAUI project example with event triggers demonstration
Adding trigger action class
To work with ...