I’m wondering if there’s any way to connect a SetState action to SwipeNavigation? I’ve currently got a nav menu with buttons to navigate between pages, and each button also triggers a State change for a rectangle as detailed in my previous (solved) post: https://www.fusetools.com/developers/forums/howto_discussions/persistent_animation_on_button_tapped_handler
However I also want the user to be able to navigate between pages by swiping, and I’d like to connect the swipe action to this same State animation, just as the buttons do. Is this possible in UX?
In general Set
should be avoided for anything that is animation related or tied to a temporary or changing trigger. Mostly we want to use Change
animators instead.
What you’ll want on each page is an Activating
trigger and then use a Change
animator to switch to the appropriate state. Soemthing like:
<Page ux:Name="Page1">
<Activating>
<Change Target='MyStates.Active' Value='Page1'/>
</Activating>
</Page>
Unlike Set
, Change
animators are not bothered by partial transitions between states. The target value will always be applied.
Note: There was a defect previously where you couldn’t do the Change
as I’ve shown above. If that’s still there in your version then it should be released with an upcoming build.
I’m also looking at a way to create actions, like Set
, which can behave more like anticipated during partial transitions.
Thanks - that solution makes sense. The defect with using the Change animator in this way is present in my version (I’m using the most recent release) so I’m looking forward to the upcoming build.