Example





In This Topic

ZoomMax Property (GdViewer)

In This Topic
Gets the highest zoom factor (maximal zoom) which can be used for the document displayed in the GdViewer control. The value of 1 represents the 100% zoom factor, 1.5 represents 150%, 2 represents the 200% zoom factor, etc.
Syntax
'Declaration
 
Public ReadOnly Property ZoomMax As Double
public double ZoomMax {get;}
public read-only property ZoomMax: Double; 
public function get ZoomMax : double
public: __property double get_ZoomMax();
public:
property double ZoomMax {
   double get();
}

Property Value

The highest zoom factor. The default value is 1.
Remarks
Be aware that this property is only meaningful if some document is displayed in the GdViewer control. Otherwise, the resulting value is 0.

Please try the Document Viewer Sample in your [INSTALLATION FOLDER]/Samples/WPF folder to find out, how to utilize zooming features in your application.

Example
How to determine the maximal zoom factor for the document displayed in the viewer.
'We assume that the GdViewer1 control has been properly integrated.
            
'Determine the maximal zoom for the displayed document.
Dim z As Short = (Math.Round(GdViewer1.ZoomMax * 100))
MessageBox.Show("The maximal zoom is " + z.ToString() + "%.", "GdViewer.ZoomMax")
//We assume that the GdViewer1 control has been properly integrated.
            
//Determine the maximal zoom for the displayed document.
short z = (short)(Math.Round(GdViewer1.ZoomMax * 100));
MessageBox.Show("The maximal zoom is " + z.ToString()+ "%.", "GdViewer.ZoomMax");
See Also