//File:Window.xaml.vb Imports System Imports System.Windows Imports System.Windows.Automation.Provider Imports System.Windows.Controls Imports System.Windows.Documents Imports System.Windows.Navigation Imports System.Text Namespace ScrollViewer_Methods Public Partial Class Window1 Inherits Window Private Sub onLoad(sender As Object, e As System.EventArgs) Dim myStringBuilder As New StringBuilder(400) For i As Integer = 0 To 99 myStringBuilder.Append("this is a test ") Next txt1.Text = myStringBuilder.ToString() End Sub Private Sub svLineUp(sender As Object, e As RoutedEventArgs) sv1.LineUp() End Sub Private Sub svLineDown(sender As Object, e As RoutedEventArgs) sv1.LineDown() End Sub Private Sub svLineRight(sender As Object, e As RoutedEventArgs) sv1.LineRight() End Sub Private Sub svLineLeft(sender As Object, e As RoutedEventArgs) sv1.LineLeft() End Sub Private Sub svPageUp(sender As Object, e As RoutedEventArgs) sv1.PageUp() End Sub Private Sub svPageDown(sender As Object, e As RoutedEventArgs) sv1.PageDown() End Sub Private Sub svPageRight(sender As Object, e As RoutedEventArgs) sv1.PageRight() End Sub Private Sub svPageLeft(sender As Object, e As RoutedEventArgs) sv1.PageLeft() End Sub End Class End Namespace