Example





In This Topic
GdPicture14.WPF Namespace / GdViewer Class / GetVerticalScrollBarMaxPosition Method

GetVerticalScrollBarMaxPosition Method

In This Topic
Gets a maximum available position of the vertical scrollbar, in pixels, related to the document currently displayed in the GdViewer control. That said, it is a maximum coordinate on the vertical axis, which the vertical scrollbar can reach on the displayed document according to the current control settings.
Syntax
'Declaration
 
Public Function GetVerticalScrollBarMaxPosition() As Double
public double GetVerticalScrollBarMaxPosition()
public function GetVerticalScrollBarMaxPosition(): Double; 
public function GetVerticalScrollBarMaxPosition() : double;
public: double GetVerticalScrollBarMaxPosition(); 
public:
double GetVerticalScrollBarMaxPosition(); 

Return Value

A maximum coordinate on the vertical axis accessible for the vertical scrollbar.
Remarks
You can regularly apply the GetStat method to determine if this method has been successful.
Example
How to set the scrollbar to its maximum available position to allow to display the bottom right corner of the document.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
If GdViewer1.HorizontalScrollBarVisible OrElse GdViewer1.VerticalScrollBarVisible Then
    GdViewer1.SetScrollBarsPosition(GdViewer1.GetHorizontalScrollBarMaxPosition(), GdViewer1.GetVerticalScrollBarMaxPosition())
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
if (GdViewer1.HorizontalScrollBarVisible || GdViewer1.VerticalScrollBarVisible)
    GdViewer1.SetScrollBarsPosition(GdViewer1.GetHorizontalScrollBarMaxPosition(), GdViewer1.GetVerticalScrollBarMaxPosition());
See Also