[Spec] Add IsEnabled to GestureRecognizer #8756
Comments
I have created an implementation, I can create a PR for it if you approve this suggestion. |
A little bit more about why this should be implemented:
|
@dhindrik some thoughts on this one
thoughts? |
|
I also prefer a solution closer to what @PureWeen is suggesting. I never need to explicitly disable a gesture but getting it disabled through the command that it is tied to would be a must. Just look at how a simple button is doing. That seems to be the way to go for me. |
This will not happen anymore for Xamarin.Forms. If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap or open an issue with a detailed feature request. Thanks! |
Add IsEnabled to GestureRecognizer
To make it possible to disable a gesture recognizer I want to add an IsEnabled property to GestureRecognizers so event and Commands not are executed if it is false.
I found this issue about it, #8091. But there are other use cases as well. There could be cases where you want to bind to other UI-elements or if you don't use MVVM (there are people that don't use it). And it will be less code if you can handle it all in XAML.
API
GestureRecognizer.cs
Properties
Scenarios
C# Example
XAML Example
Backward Compatibility
Because it is true by default it is backward compatible
Difficulty : low
The text was updated successfully, but these errors were encountered: