I think we can all agree on a baseline of professionalism.
But I think if we can all agree that you should 'play by the rules' when in full view of the public, which 99% of us can agree with, it's best left at that.
I've heard stories of people running across the terminal to scream "WHERE IS YOUR HAT?!" where the pilot's hat was severely damaged or dripping wet with de-icing fluid. Also, a verbal confrontation over a uniform hat in clear view of the public is far worse.
BTW, I hate having to wear my cap! Argh!