DocumentAlignment Property (GdViewer)
In This Topic
Gets or sets the default page alignment within the GdViewer control when the area of the control is smaller than the document to be displayed
in its current zoom configuration. For example, setting this property to ViewerDocumentAlignment.DocumentAlignmentTopLeft displays the most top-left part
of the current page during the zoom-in operation.
Syntax
Property Value
The default value is ViewerDocumentAlignment.DocumentAlignmentMiddleCenter.
Example
How to set the required document alignment.
'We assume that the GdViewer1 control has been properly integrated.
'Determine the current document alignment.
MessageBox.Show("The current document alignment is " + GdViewer1.DocumentAlignment.ToString() + ".", "GdViewer.DocumentAlignment")
'Set the required document alignment.
GdViewer1.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopLeft
//We assume that the GdViewer1 control has been properly integrated.
//Determine the current document alignment.
MessageBox.Show("The current document alignment is " + GdViewer1.DocumentAlignment.ToString()+ ".", "GdViewer.DocumentAlignment");
//Set the required document alignment.
GdViewer1.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopLeft;
Example
How to set the required document alignment.
'We assume that the GdViewer1 control has been properly integrated.
'Determine the current document alignment.
MessageBox.Show("The current document alignment is " + GdViewer1.DocumentAlignment.ToString() + ".", "GdViewer.DocumentAlignment")
'Set the required document alignment.
GdViewer1.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopLeft
//We assume that the GdViewer1 control has been properly integrated.
//Determine the current document alignment.
MessageBox.Show("The current document alignment is " + GdViewer1.DocumentAlignment.ToString()+ ".", "GdViewer.DocumentAlignment");
//Set the required document alignment.
GdViewer1.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopLeft;
See Also