In the act of (doing something)

While doing something.

The young man was arrested in the act of stealing an MP3 player from the store.