src/Misc/EFTools/EntityDesignPackage/CustomCode/MicrosoftDataEntityDesignCommandSet.cs
/// <summary>
///     Status handler: "Snap to Grid"
///     Available only when user right-clicks on empty area of designer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Status handler: "Snap to Grid"
Available only when user right-clicks on empty area of designer
Status handler : " Snap to Grid " Available only when user right - clicks on empty area of designer
internal void OnStatusSnapToGrid(object sender, EventArgs e)
        {
            var cmd = sender as MenuCommand;
            Debug.Assert(cmd != null, "could not cast sender as a MenuCommand");
            if (cmd != null)
            {
                var diagram = GetDiagram();
                if (diagram != null)
                {
                    cmd.Enabled = cmd.Visible = IsOurDiagramSelected();
                    cmd.Checked = diagram.SnapToGrid;
                }
                else
                {
                    cmd.Enabled = cmd.Visible = false;
                }
            }
        }
internal void OnStatusSnapToGrid ( object sender , EventArgs e ) { var cmd = sender as MenuCommand ; Debug . Assert ( cmd != null , " " ) ; if ( cmd != null ) { var diagram = GetDiagram ( ) ; if ( diagram != null ) { cmd . Enabled = cmd . Visible = IsOurDiagramSelected ( ) ; cmd . Checked = diagram . SnapToGrid ; } else { cmd . Enabled = cmd . Visible = false ; } } }
Status handler: "Snap to Grid"
Available only when user right-clicks on empty area of designer
Status handler : " Snap to Grid " Available only when user right - clicks on empty area of designer
sender
object
None
e
EventArgs
None