This might help you get a start:
In this .capx file you have the basic concept . A helper sprite detects the ledge sprite, and if input is down, then we disable platform as long as input is being held.
In this case I didn't add the possibility of falling. Which would be on:
On Input released --> set playerDetect Platform Enabled
Now, animations when climbing will have to follow at an offset from playerDetect.ImagePoint(0).
This is just the beginning so if you need more help don't hesitate.
Also, the reason why I asked if you wanted to replicate that game exact movement is because in games like Prince of Persia, flashback, Nosferatu etc, they use a grid like movement which is different. I have somewhere a small capx file replicating that sort of movement as well.
https://drive.google.com/file/d/0B27TG57JCwl_Q2RpSmJOcDlMRUk/view?usp=sharing