I was once with a group of other trans women at a club. It was clear the guy behind the bar knew we were trans and wasn't about to concede an inch of pleasantness when I went up to order a drink. The grumpy frown on his face might have been his usual look, I dunno, but I took it as a challenged and gave him a huge smile and hello. Before he knew it he was smiling back.
A few months ago I was on a weekend train, an elderly couple were sitting opposite me staring and exchanging comments in Hindi, it was pretty darn rude. So I just stared back, smiled and waved. That took care of them.
I think the number one rule is not care what other people think. Obviously if what they're thinking is "I'm going to cause that person some serious hurt" then you should get to a safe place ASAP, otherwise just ignore them and/or smile.