As we know, there is a scaled menu item in the Visio menu view, and as shown below, selecting the response option scales the drawing.
In addition, its sidebar also has a drop-down list box, in addition to the choice of existing options, you can also enter a custom value, to achieve the custom scaling function.
This article describes how to use C # and Visio SDK functions to implement various scaling operations for drawings in Visio. First we create a scaling menu item and a variety of scaling submenu items, as shown in the first shape, and then point to the same function for all the child menu item's event handling, as shown below
private void menu_View_Zoom_Click(object sender, EventArgs e)
{
ToolStripMenuItem item = (ToolStripMenuItem)sender;
SetZoom(item.Text);
}
Then add the Drop-down list box, as shown in the second graphic, and add its handler function.
private void tsStandard_Zoom_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
SetZoom(tsStandard_Zoom.Text);
}
}