-
Notifications
You must be signed in to change notification settings - Fork 457
[Enhancement] More control for xct:TouchEffect #842
Description
Summary
xct:TouchEffect is awesome so thanks for that! However there's two features I am sorely missing:
- Ability to route the animation to another view. Ponder for example the following "button" consisting of a frame, label and image:
If an xct:TouchEffect.NativeAnimation="True"
is added to the root frame, the entire "button" will animate when interacted with:
Expected is of course that (at least on iOS) just the contents would fade out; this is exactly what would happen if this was just a plain button.
I can't find a way to accomplish this with XCT's TouchEffect - if I add the effect to the root frame then the entire construct will fade out when interacted with (as in the above screenshot), and if I add it to say the label only then the fade will only take place if the user taps exactly on the label portion.
I would like to add the effect to the root of the construct and either:
a) have a flag controlling whether only children should be animated
b) have the ability to define animation target via a binding
Maybe there is some way of accomplishing this already but I just haven't found it?
-
Event support. I have a ton of events that are currently fired from TapGestureRecognizers in my project. (The reasoning for this is that the view handles visualisation like message boxes etc, and they subsequently invoke the vm commands if relevant). I couldn't find a way to specify events to xct:TouchEffect, only commands. Is there a reason why events are not supported? I can't see the feature as complete with only command support.
-
Ability to opt out some element in a hierarchy from an animation.
Use case is for example a button that has a 'badge' that appears if there's notifications.
The badge in this example should not fade out when the user taps the button.
Thank you.
API Changes
On top of my head:
Feature 1:
xct:TouchEffect.AnimateChildrenOnly="True"
and/or
xct:TouchEffect.AnimationTarget="{x:Reference someView}"
Feature 2:
xct:TouchEffect.Event="MyEvent"
xct:TouchEffect.LongPressEvent="MyLongPressEvent"
Feature 3:
xct:TouchEffect.OptOutFromAnimationHierarchy="True"
Intended Use Case
See above.
Who Will Do The Work?
- I am willing to take this on myself
- [X ] Just putting this out there for someone to pick up