Redigera

Dela via


.NET MAUI Behaviors

.NET Multi-platform App UI (.NET MAUI) behaviors let you add functionality to user interface controls without having to subclass them. Instead, the functionality is implemented in a behavior class and attached to the control as if it was part of the control itself.

For further information on Behaviors please refer to the .NET MAUI documentation.

.NET MAUI Community Toolkit Behaviors

The .NET MAUI Community Toolkit provides a collection of pre-built, reusable behaviors to make developers lives easier. Here are the behaviors provided by the toolkit:

Behavior Description
AnimationBehavior The AnimationBehavior is a Behavior that provides the ability to animate any VisualElement it is attached to.
CharactersValidationBehavior The CharactersValidationBehavior is a Behavior that allows the user to validate text input depending on specified parameters.
EmailValidationBehavior The EmailValidationBehavior is a Behavior that allows users to determine whether or not text input is a valid e-mail address.
EventToCommandBehavior The EventToCommandBehavior is a behavior that allows the user to invoke a Command through an Event. It is designed to associate Commands to events exposed by controls that were not designed to support Commands. It allows you to map any arbitrary event on a control to a Command.
IconTintColorBehavior The IconTintColorBehavior is a behavior that allows you to tint an image.
ImageTouchBehavior The ImageTouchBehavior extends the TouchBehavior by providing the ability to customize Image elements based on touch, mouse click and hover events.
MaskedBehavior The MaskedBehavior is a Behavior that allows the user to define an input mask for data entry.
MaxLengthReachedBehavior The MaxLengthReachedBehavior is a behavior that allows the user to trigger an action when a user has reached the maximum length allowed on an InputView.
MultiValidationBehavior The MultiValidationBehavior is a Behavior that allows the user to combine multiple validators to validate text input depending on specified parameters.
NumericValidationBehavior The NumericValidationBehavior is a Behavior that allows the user to determine if text input is a valid numeric value.
ProgressBarAnimationBehavior The ProgressBarAnimationBehavior animates a ProgressBar from its current Progress value to a provided value over time.
RequiredStringValidationBehavior The RequiredStringValidationBehavior is a Behavior that allows the user to determine if text input is equal to specific text.
SelectAllTextBehavior The SelectAllTextBehavior is a Behavior that allows selecting all text in an InputView (e.g. an Entry or Editor) when it becomes focused.
SetFocusOnEntryCompletedBehavior The SetFocusOnEntryCompletedBehavior is a Behavior that gives focus to a specified VisualElement when an Entry is completed.
StatusBarBehavior The StatusBarBehavior is a Behavior that allows you to customize the color and style of your device statusbar.
TextValidationBehavior The TextValidationBehavior is a Behavior that allows the user to validate a given text depending on specified parameters.
TouchBehavior The TouchBehavior is a Behavior that provides the ability to interact with any VisualElement based on touch, mouse click and hover events.
UriValidationBehavior The UriValidationBehavior is a Behavior that allows users to determine whether or not text input is a valid URI.
UserStoppedTypingBehavior The UserStoppedTypingBehavior is a behavior that allows the user to trigger an action when a user has stopped data input an Entry.