"When you wear a dress, you are pretty."
Translation:Lorsque vous portez une robe, vous êtes jolie.
"lorsque" means "when" in the temporal sense only (synonymous "quand")
"alors que" means "even though" or "while" and can have both meanings (synonymous "tandis que")
mettre une robe = to put on a dress.
in this sentence, the meaning is that she is pretty in a dress, not that she is pretty when she is in the process of putting on a dress.