Class ZoomTool
Interactive tool for zooming in and out of a Diagram's view is based on the center, top-left, and pointer position using Ctrl + mouse wheel.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class ZoomTool : UITool, IDisposable
Remarks
Left click increases magnification by 25%. Right click decreases magnification by 25%.
Tool MagnificationConstructors
ZoomTool(DiagramController)
Initializes a new instance of the ZoomTool class.
Declaration
public ZoomTool(DiagramController controller)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
Properties
MaximumMagnification
Gets or sets maximum magnification value the tool will zoom to.
Declaration
public int MaximumMagnification { get; set; }
Property Value
Type |
---|
System.Int32 |
MinimumMagnification
Gets or sets minimum magnification value the tool will zoom to.
Declaration
public int MinimumMagnification { get; set; }
Property Value
Type |
---|
System.Int32 |
ZoomIncrement
Gets or sets the amount to zoom each time the mouse is clicked.
Declaration
public int ZoomIncrement { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
Draw(Graphics)
Draws the specified graphics.
Declaration
public override void Draw(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Overrides
ProcessKeyDown(KeyEventArgs)
Processes the key down.
Declaration
public override Tool ProcessKeyDown(KeyEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | evtArgs | The System.Windows.Forms.KeyEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseDown(MouseEventArgs)
Processes the mouse down.
Declaration
public override Tool ProcessMouseDown(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseMove(MouseEventArgs)
Processes the mouse move.
Declaration
public override Tool ProcessMouseMove(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ProcessMouseUp(MouseEventArgs)
Processes the mouse up.
Declaration
public override Tool ProcessMouseUp(MouseEventArgs evtArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | evtArgs | The System.Windows.Forms.MouseEventArgs instance containing the event data. |
Returns
Type | Description |
---|---|
Tool | The tool. |
Overrides
ZoomFrame(Rectangle)
Fit viewport to given frame.
Declaration
protected virtual void ZoomFrame(Rectangle rcZoom)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle | rcZoom | The zoom frame. |