Class ZoomSlider
- Namespace
- Northwoods.Go.Extensions
- Assembly
- ZoomSliderWinForms.dll
This class implements a zoom slider for GoDiagram diagrams.
public class ZoomSlider
- Inheritance
-
ZoomSlider
- Inherited Members
Remarks
The constructor has the following arguments:
diagram
Diagram a reference to a GoDiagram diagram
Unlike the GoJS version, this version of the ZoomSlider extension only provides an interface between a "range" input and the zoom state of a connected Diagram. As such, all properties such as size, button size, alignment, etc should be handled separately and are not passed as parameters to this Extension.
The Extension takes as parameters two delegates, which should respectively get and set the value parameter of the Range component. An example of this implementation can be found in the ZoomSlider sample.
Constructors
ZoomSlider(Diagram, Func<double>, Action<double>)
Constructs a ZoomSlider and sets up properties based on the options provided. Also sets up change listeners on the Diagram so the ZoomSlider stays up to date.
public ZoomSlider(Diagram diagram, Func<double> get, Action<double> set)
Parameters
Properties
Diagram
This read-only property returns the diagram for which the slider is handling zoom.
public Diagram Diagram { get; }
Property Value
Methods
UpdateScale()
Modify the Diagram.Scale according to the value of the ZoomSlider.
This function should be called when the value of the ZoomSlider changes.
public void UpdateScale()