The right colored nude, full coverage knicker, a loose cut (I usually size up), a good quality linen, an appropriate setting, and a bit of nonchalance towards things not being totally invisible.
Honestly, I sometimes wonder why some women beat themselves up at the thought that someone might see a hint of their undies. I refuse to wear a cami in the summer, and, if my linen shirt shows a flash of a pretty bra, so be it. I'm comfortable that I'm fully covered with my nude grannie knickers instead of revealing my butt in a thong, so I don't much care if my swishy linen pants might hint that I'm wearing something under them. Maybe I spent too much time in France and other countries where women don't seem to have as much of a hangup about a flash of lingerie?