Hi. Imagine a 5 column two row grid of flip charts (10 flip charts total).
Each flip chart has two images (an on and an off state).
Lets say I tap the upper left flip chart to reveal the second image.
Is there a way to automatically flip it back to its original state when a user clicks on another image (i.e. lower right corner)
Thanks for your help.
This may be a perfect application for one of my favorite things to do with bindings and converters.
There may be another way to do this if I give it some more thought - but try this:
- Set invisible Toggle buttons over each flip chart in the grid. Using bindings or actions, set the flip chart to be at index 1 or 2 based on the toggle’s checked state that sits on top of it.
- Create a counter or a global variable, it doesn’t matter which. Bind ALL of the checked-states of ALL of the toggle buttons to this variable.
- For each toggle button, set a converter of “Is Equal To” and input 1 for the first button, 2 for the second, 3 for the third, until all of the converters have their own unique number.
- When each toggle button is Checked, set it to change the Global variable to 1,2,3…etc…whatever matches the converter for that toggle. That should cause the flip chart to flip only when the variable shows it’s number, and unflip any others that don’t match.
Using copy/paste for each of the toggle buttons can save you a ton of time on this one.
Hopefully this helps or at least puts you on a good path.