"My bike rolled forward off the kickstand and fell over while getting on it the other day. Is there a trick to prevent this from happening?"
This is a common problem that many rookie riders encounter while parked facing downhill or even on flat ground. The simplest solution comes courtesy of the Motorcycle Safety Foundation (MSF), and it recommends grabbing the front brake before swinging a leg over. While this might feel a bit strange at first, after a few weeks it will become second nature. By doing so, the bike will be locked in place irrespective of the road conditions or an accidental bump while mounting up.
Another option is to leave the bike in gear while parked. While this option is just as effective, be careful that you don't start the bike in gear. Most bikes won't start with the bike in gear or without the clutch pulled in, but it's still safer to start your bike in neutral. It's the little things that go a long way.