GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / ViewRotation Property
Example





ViewRotation Property (GdViewer)
Gets or sets the current rotation and flipping of the page view in the GdViewer control.

This property specifies how the view is rotated and flipped in the GdViewer control when displaying the page.

Syntax
'Declaration
 
Public Property ViewRotation As GdPictureRotateFlipType
 

Property Value

A member of the GdPictureRotateFlipType enumeration. The default value is GdPictureRotateFlipType.GdPictureRotateNoneFlipNone.
Remarks
To only rotate a single page, you can use the RotatePage method. To rotate the curent view, you can use the RotateView method.
Example
How to rotate the viewer's global view upside down and find out the final view 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.RotateView(rotation)
    MessageBox.Show("The current view is rotated: " + GdViewer1.ViewRotation.ToString(), "GdViewer.ViewRotation")
Else
    MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.ViewRotation")
End If
See Also