GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / DocumentPosition Property
Example





In This Topic
DocumentPosition Property (GdViewer)
In This Topic
Gets or sets the default page position within the GdViewer control when the rendering area of the displayed document in its current zoom configuration is smaller than area of the control.

The toolkit only supports ViewerDocumentPosition.DocumentPositionMiddleCenter if the PageDisplayMode property is other than PageDisplayMode.SinglePageView.

Syntax
'Declaration
 
Public Property DocumentPosition As ViewerDocumentPosition
public ViewerDocumentPosition DocumentPosition {get; set;}
public read-write property DocumentPosition: ViewerDocumentPosition; 
public function get,set DocumentPosition : ViewerDocumentPosition
public: __property ViewerDocumentPosition get_DocumentPosition();
public: __property void set_DocumentPosition( 
   ViewerDocumentPosition value
);
public:
property ViewerDocumentPosition DocumentPosition {
   ViewerDocumentPosition get();
   void set (    ViewerDocumentPosition value);
}

Property Value

The default value is ViewerDocumentPosition.DocumentPositionMiddleCenter.
Remarks
Be aware, that the toolkit only supports ViewerDocumentPosition.DocumentPositionMiddleCenter if the PageDisplayMode property is other than PageDisplayMode.SinglePageView.
Example
How to set the required document position.
'We assume that the GdViewer1 control has been properly integrated.
            
'Determine the current document position.
MessageBox.Show("The current document position is " + GdViewer1.DocumentPosition.ToString() + ".", "GdViewer.DocumentPosition")
'Set the required document position.
GdViewer1.DocumentPosition = ViewerDocumentPosition.DocumentPositionTopLeft
//We assume that the GdViewer1 control has been properly integrated.
            
//Determine the current document position.
MessageBox.Show("The current document position is " + GdViewer1.DocumentPosition.ToString()+ ".", "GdViewer.DocumentPosition");
//Set the required document position.
GdViewer1.DocumentPosition = ViewerDocumentPosition.DocumentPositionTopLeft;
See Also