How to end a level, after all items in level have been collected?

can you provide examples and screenshots?