3 Imports System
.Windows
.Controls
8 Partial
Public Class Window1
11 Public Sub windowLoaded(ByVal sender
As Object, ByVal e
As RoutedEventArgs
)
13 myCheckBox
.IsChecked
= False
14 myTextBox
.AutoWordSelection
= False
17 Public Sub AutoWordSelectionToggle(ByVal sender
As Object, ByVal args
As RoutedEventArgs
)
18 myTextBox
.AutoWordSelection
= myCheckBox
.IsChecked
.Value
20 Public Sub LoadSampleContent()
21 'Assumes sample content file is in the root project folder, and that
22 'the project exectutable will be in bin\debug relative to the root
23 'project folder. Tweak as necessary.
24 Dim relativePathAndFileName
As String = "..\\..\\sample_content.txt"
25 Dim fileToLoad
As New StreamReader(relativePathAndFileName
)
26 myTextBox
.Text
= fileToLoad
.ReadToEnd()