Xamarin Community Toolkit UserStoppedTypingBehavior
The UserStoppedTypingBehavior is a behavior that allows the user to trigger an action when a user has stopped data input an Entry
. Examples of its usage include triggering a search when a user has stopped entering their search query.
Syntax
<Entry>
<Entry.Behaviors>
<xct:UserStoppedTypingBehavior
Command="{Binding SearchCommand}"
StoppedTypingTimeThreshold="1000"
MinimumLengthThreshold="3"
ShouldDismissKeyboardAutomatically="True" />
</Entry.Behaviors>
</Entry>
Properties
Property | Type | Description |
---|---|---|
Command | ICommand | The command to execute when the user has stopped providing input. |
MinimumLengthThreshold | int | The minimum length of the input value required before the command will be executed. |
ShouldDismissKeyboardAutomatically | bool | Indicates whether or not the keyboard should be dismissed automatically. |
StoppedTypingTimeThreshold | int | The time of inactivity in milliseconds after which the command will be executed. |
Sample
You can see this in action in the Xamarin Community Toolkit Sample App.