I think everyone's mentioned some great points.
Holding the foot in a way that they can't easily pull away - I've been having to squeeze medicine on a 19 hand Belgian's VERY painful thrushy feet, despite the massive difference I'm able to (mostly) prevent him from dropping his foot by holding it as Loosie described, at the toe, fully flexed.
Pain can be an issue, so while you want the lower leg flexed, try not to cram their leg all the way up, it's not easy for them to hold their legs in those cramped positions if they aren't flexible.
But I think another aspect that I don't think has been mentioned is trust.
A horse's entire life depends on their feet and their ability to get away. Giving up their foot to a human is a total display of trust - of course it can be forced or otherwise terrible - but when done right there's gotta be trust. This horse may only trust you so much to hold give up their foot for a few seconds. Most horses I know will rear up or throw themselves on the ground in total panic the first few times a human tries to pick their feet up - if there was no preperation.
Practice your basic groundwork - in your groundwork periodically ask her to pick up a foot and then when she's holding it calmly for a second or two put it back down (gently, don't just drop it). Carry on with your ground work and go back to another foot. Over time increase the amount of time the feet are off the ground.
I can now clean her fronts and can run my hands down her backs without her moving or stomping. I think it is more about trust and pain with her.