This sample shows you how to implement pan and zoom in a diagram programmatically. Scrolling with the mouse wheel results in zoom. When you press the Ctrl key and drag the diagram, it gets panned.