First, criminals go for the weakest target they can find (generally). There was a document encounter of a couple criminals waiting for a few patrons to leave a restraunt who had visible sidearms. I have only read about one documented incident, however I would believe this does happen on occasion and most times, no one never knows a crime was about to happen.
Now for the scenario where a robbery is in progress. If I can draw my sidearm without him seeing it, then I would absolutely shoot him given the opportunity to do it with as little risk to myself and others in the area as possible. The criteria I need to meet to draw my sidearm, is that I feel that myself or someone in the immediate vicinity is in danger of life or limb. I do not carry my pistol as a bluff, I have trained and am willing to use it to save my life or the lives of others.