Helloooo! Heard you about her pacing in an X Pen, that's got to be hard to watch. Okay, now for the down and dirty:
Are you using disposable peepads or washables? Switch up. My girls do better with the washables. Scenting the pads is good, but maybe scent it with another dog's urine...
Does she tend to use the same areas or just random anywhere? If she has specific spots she seems to gravitate to, put pads in those areas. I'm guessing not though. No solution here, except using an entire room as Kalina82 stated in her post.
The Kicker: You should never tell a Yorkie 'No' concerning pottying. They are too smart and won't get that you mean 'No, not here'. They take it over the top and interpret 'No' to mean you don't want them to potty, at all, anywhere, ever!

This leads to what you described... she waits till you don't see her and then she 'goes'.
Accidents are your fault. Know/learn her signals and make it comfortable for her to potty, and reward her and praise her for doing it right. She will eventually 'get it'. Be consistant. You may be asking 'Well then, how do I handle accidents?" You totally ignore them as they happen (except for the first 3-4 when you're teaching the command word association), then afterwards you clean them up using an enzymatic cleaner. No mumbling or muttering under your breath, no sideways glares at the dog. You say nothing to her, nada, zilch, nothing. No moaning either!
The Fix: What is her favorite treat? Have alot of it ready, in hand. Then sit back and watch her. One of mine is hysterical. She'll be eating, then, all of a sudden she has to go. No, I mean she really has to go. (I can really relate to that! lol) It comes on her so fast, she doesn't have time to make it to the door. At least now she heads toward the door so that's a big plus, and she will use peepads most of the time, especially when I remember to put one down!
Anyway.... back to you. Watch her and time how long it takes for her to relieve herself after a meal. Being that she goes anywhere at this point, if you catch her going, gently in a whisper tone, say a command, like 'Go Potty' while she's going. You don't want to startle her or interupt her. Then give her a treat and alot of praise. You are not rewarding her choice of spots at this time, you are rewarding the act of peeing in your presence. And you are associating a word with the action.
After a few times of her going with you watching, when that time comes after a meal, place her on a pad, and give the command (whichever one you choose to use, but pick one and stick with it.) and have the treat ready. The first time she goes on the pad with you watching, praise her like she's never heard praise before. And give her treats.
Toys: My girls like anything that sounds like a puppy. So small squeaky toys are 'in' with them. My older male only likes one toy, and that's the tiny little squeaky Teddybear, and he'll only play with it if I'm there playing with him, preferably on the bed, and hands under the covers.