I have a requirement for an expander that can be used via touch control. I have no trouble expanding the expander when the user touches the toggle button, however I would like to expand by dragging the expander, (much like the expander on the iPhone where you swipe down from the top)
I can use the manipulation events to capture a swipe gesture and I can open the expander using that event. However I have no idea how to make the expansion state follow the finger.
I would like it so that if you drag to a certain percentage of its final size it will snap open if you let it go and if less than this percentage snap closed.
I am at a loss and can;t find anything on google related to this issue so any help would be gratefully received
Have a look into the possibility of using a GridSplitter. I have used these before to make finger dragable UI however not to expand an expander. I imagine a grid with three columns, center containing the gridsplitter and right containing a fixed size may give you the functionality you want however this may need some converters/code behind to keep this in sync with properties such as the IsExpanded property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With