GdPicture.NET Reference Guide
PagePixelWidth Property

GdPicture14.WPF Namespace > GdViewer Class : PagePixelWidth Property
Returns the width, in pixels, of the current page of the document displayed in the GdViewer control.
Public ReadOnly Property PagePixelWidth As Integer
public int PagePixelWidth {get;}
public read-only property PagePixelWidth: Integer; 
public function get PagePixelWidth : int
public: __property int get_PagePixelWidth();
property int PagePixelWidth {
   int get();

Property Value

The current page width, in pixels.
How to determine the area of the point clicked by the mouse.
'We assume that the GdViewer1 control has been properly integrated.
Private Sub GdViewer1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs)
    Dim message As String = "This point is inside the document area."
    Dim ViewerLeft As Double = e.GetPosition(Me).X, ViewerTop As Double = e.GetPosition(Me).Y
    Dim DocumentLeft As Double = 0, DocumentTop As Double = 0
    GdViewer1.CoordViewerPixelToDocumentPixel(ViewerLeft, ViewerTop, DocumentLeft, DocumentTop)
    If DocumentLeft < 0 OrElse DocumentTop < 0 OrElse DocumentLeft >= GdViewer1.PagePixelWidth OrElse DocumentTop >= GdViewer1.PagePixelHeight Then
        message = "This point is outside the document area."
    End If
    MessageBox.Show(message, "GdViewer.PagePixelWidth")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void GdViewer1_MouseClick(object sender, MouseEventArgs e)
    string message = "This point is inside the document area.";
    double ViewerLeft = e.GetPosition(this).X, ViewerTop = e.GetPosition(this).Y;
    double DocumentLeft = 0, DocumentTop = 0;
    GdViewer1.CoordViewerPixelToDocumentPixel(ViewerLeft, ViewerTop, ref DocumentLeft, ref DocumentTop);
    if (DocumentLeft < 0 || DocumentTop < 0 || DocumentLeft >= GdViewer1.PagePixelWidth || DocumentTop >= GdViewer1.PagePixelHeight)
        message = "This point is outside the document area.";
    MessageBox.Show(message, "GdViewer.PagePixelWidth");
See Also


GdViewer Class
GdViewer Members
PagePixelHeight Property
PageHorizontalResolution Property
PageVerticalResolution Property
PageInchWidth Property
PageInchHeight Property
CoordViewerPixelToDocumentPixel Method
CoordDocumentPixelToViewerPixel Method