First, it is important to try to pinpoint exactly why your Yorkie is whining. For example, you want to eliminate pain as a possible trigger. Pain may account for Yorkie whining, or it may not.
Another reason why Yorkie whining may occur is if your dog is seeking attention. You want to be sure that you are not rewarding your Yorkie for using whining as an attention seeking technique. A lot of people will make the mistake of giving the dog a treat or attention in response to the whining.
It is sort of like kids in that the whining is such an annoying sound, you just want to do whatever to stop it. Have you ever seen the parents whose kid is crying in public, so they throw a lollipop at them?
Giving your Yorkie a treat to stop whining will not end the behavior, but rather will send the message to the dog that future whining will also be rewarded. This is a bad message to send to the dog.
If your Yorkie is whining, immediately put the dog down. Do not play with your Yorkie or otherwise interact with it in any way. If the whining stops, then you can pick your dog back up and play, rewarding him/her for stopping the whining. It is important to be firm and consistent with this approach and not to make any exceptions.
Be sure that you do not shout or yell or use physical force with your Yorkie as an attempt to curb whining. Yorkie whining will not cease with negative reinforcement. Rather, yelling at the dog is actually a form of attention, and your Yorkie may be seeking precisely that: attention.
Some Yorkies may whine due to separation anxiety. If this is the case, one highly recommended training technique is crate training. Your Yorkie should sleep in the crate at night, and should spend time in the crate whenever you are not around to supervise.
You should also be sure not to give your Yorkie attention (positive or negative) when you are coming and going from the home. Whenever you give your dog any kind of attention when you are coming or going from the home, they begin to have anxiety about you leaving. Thus, it is important to eliminate possible triggers of the separation anxiety.