I usually put the knee warmers on first, position them where I like, and then put the shorts on (rather than putting the shorts on, then tucking the knee warmers under). That way, as the shorts slide in to position, they pull upward against the knee warmers. It seems to help hold them in place.
__________________
The rider in my avatar is David Etxebarria, not me.