I just think a lot of people too freely assume that a dog is friendly and base their actions on the dog's they have previously met but i do agree with Anne, in the sense that you do expect a little more freedom in playing with and patting a strange dog in a friends home. However, if i was to go to a friends and actually told "please don't pat the dog"..of corse i would obey that wish.
My partner and i walked down to the shops a few weeks ago. I waited out the front whilst OH went in to grab some things. Not 1, but 3 people stopped and lent down to pat Buckley whilst he tried to hide in between my legs. Just lucky he didn't growl or snap at them! One man actually grabbed Buckleys head and did that rough kind of head shake pat. I would call that ignorant. Never assume a dog is friendly just because they are happy to stand calmly next to their owner. When did that sort of thing become ok!? I for one would never ever pat someone dogs out in public without asking first.