How to implement a click event for a stackpanel

Nii Laryea picture Nii Laryea · Jul 17, 2013 · Viewed 22.4k times · Source

I checked the stackpanel class here http://msdn.microsoft.com/en-us/library/system.windows.controls.stackpanel.aspx and it has no click event.

I'm working on a windows phone 8 app and I've got a textbox and some buttons on a stack panel. I want to include a feature where the stackpanel can be clicked then the visibility of the controls on it are set to collapsed, and then when clicked again they become visible.

How do I do this?

Answer

Daniel Hilgarth picture Daniel Hilgarth · Jul 17, 2013

Try using the MouseLeftButtonUp event.