Hey, I’m relatively new to Fuse, just installed it and learning. While building a simple mobile app I came to a problem which I can’t find solution for on documentation page.
So, the height of the rectangle is working fine when swiping up, but, I want to have persistant height of it and in this example, it returns to it’s original heigh after I remove my finger. I know I can use < Set botPan.Height> but there is no animation there.
So my questions is:
Is there a way to use < Change > to set a persistant value, and then use < SwipeGesture > to bottom to set it to default.
OR
Should I use < Set > to set a persistant value, but in this case, how do I animate the swiping animation?
You may instead be looking for the Type="Active" property on the SwipeGesture. This creates a tray-like swiping gesture instead. The user can swipe to open/close the tray. When open your SwipingAnimation will be applied to 100% until the user closes it.
You can also use the SetSwipeActive and ToggleSwipeActive to programmatically modify the open/closed state of the gesture. There is also WhileSwipeActive which is active while the gesture is “open”.
In any case, if you decide to keep using the toggle you have now, you should not use SwipingAnimation to do these. Placing actions inside such triggers is a delicate situation – it is deterministic and defined, but rarely what you want. Use the Swiped trigger instead.
I learn something every day. Swiped also worked which is great to see, especailly if it’s more appropriate for this situation, but I question tied to this:
How would I make the Swipe bi-directional? For example, using <Swiped> currently works, but what should I do if I want to make a gesture down (swipe down) to make tray close? Currently, both opening and closing the tray works if I swipe up. Opening should be as current, swipe up, but closing should be swipe down.
That’s what the Type="Active" does for you automatically. Just make a SwipingAniamtion that exposes the panel and nothing more – put your Height change directly in the swiping animation.
This will be a panel that swipes up to open and down to close.