src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignDocView_PanZoom.cs
/// <summary>
///     Display the pan window on the mouse down.
/// </summary>
Display the pan window on the mouse down.
Display the pan window on the mouse down .
private void PanPanelMouseDownHandler(object sender, MouseEventArgs e)
        {
            var diagram = CurrentDiagram as EntityDesignerDiagram;
            if (diagram == null)
            {
                return;
            }
            var showingGrid = diagram.ShowGrid;
            diagram.ShowGrid = false;
            using (var thumbnailViewForm = 
                new ThumbnailViewForm(((Control)sender).Parent, CurrentDesigner.DiagramClientView))
            {
                thumbnailViewForm.ShowDialog();
            }
            diagram.ShowGrid = showingGrid;
        }
private void PanPanelMouseDownHandler ( object sender , MouseEventArgs e ) { var diagram = CurrentDiagram as EntityDesignerDiagram ; if ( diagram == null ) { return ; } var showingGrid = diagram . ShowGrid ; diagram . ShowGrid = false ; using ( var thumbnailViewForm = new ThumbnailViewForm ( ( ( Control ) sender ) . Parent , CurrentDesigner . DiagramClientView ) ) { thumbnailViewForm . ShowDialog ( ) ; } diagram . ShowGrid = showingGrid ; }
Display the pan window on the mouse down.
Display the pan window on the mouse down .
// store off whether we are showing the grid // turn off the grid before we build our thumbnail  // (without this, VS hangs while generating the thumbnail) // we pass the parent Panel control so that the thumbnail view centers on it // restore the original setting
sender
object
e
MouseEventArgs