Example





In This Topic
GdPicture14.WPF Namespace / GdViewer Class / PageRotation Property

PageRotation Property (GdViewer)

In This Topic
Returns the rotation and flipping of the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
 
Public Property PageRotation As GdPictureRotateFlipType
public GdPictureRotateFlipType PageRotation {get; set;}
public read-write property PageRotation: GdPictureRotateFlipType; 
public function get,set PageRotation : GdPictureRotateFlipType
public: __property GdPictureRotateFlipType get_PageRotation();
public: __property void set_PageRotation( 
   GdPictureRotateFlipType value
);
public:
property GdPictureRotateFlipType PageRotation {
   GdPictureRotateFlipType get();
   void set (    GdPictureRotateFlipType value);
}

Property Value

A member of the System.Drawing.RotateFlipType enumeration. The current page rotation and flipping.
Remarks
You can use the RotatePage method to rotate a single page in the control.
Example
How to rotate the current page upside down in the viewer and find out the final page rotation value.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
    Dim rotation As GdPictureRotateFlipType = GdPictureRotateFlipType.Rotate180FlipNone
    GdViewer1.RotatePage(rotation)
    MessageBox.Show("The current page is rotated: " + GdViewer1.PageRotation.ToString(), "GdViewer.PageRotation")
Else
    MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
    GdPictureRotateFlipType rotation = GdPictureRotateFlipType.GdPictureRotate180FlipNone;
    GdViewer1.RotatePage(rotation);
    MessageBox.Show("The current page is rotated: " + GdViewer1.PageRotation.ToString(), "GdViewer.PageRotation")
}
else
    MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation");
See Also